PowerShell: Ping Host List from Text File

Here’s a quick PowerShell script to ping a list of hosts (computers, or other IP endpoints) from a text file. In addition, it eliminates error messages, which results in a filtered list of hosts that are alive. It runs quickly, because the ping count has been restricted to 1, from …

Continue reading

PowerShell: Update your ConfigMgr OSD Boot Images to WinPE 3.1

When you upgrade your boot images in Microsoft’s System Center Configuration Manager (SCCM / ConfigMgr) 2007 from WinPE 3.0 to WinPE 3.1, you must run the ExportDefaultBootImage() WMI method on the SMS_BootImagePackage WMI class for each boot image architecture. Typically this would simply include x86 (32-bit) and x64 (64-bit) boot …

Continue reading

PowerShell 3.0: List of Windows 8 Cmdlets & Modules

Here is a list of modules available in the new Windows Server 8: Name —- ADDeploymentWF AppLocker Appx BestPractices BitsTransfer BranchCache CimCmdlets ClusterAwareUpdating DirectAccessClientComponents Dism DnsClient DnsConfig DnsLookup DnsNrpt FailoverClusters  

Continue reading

PowerShell: Determine Number of Parameters on Cmdlets

In PowerShell, each “cmdlet” has input and output parameters. Cmdlet definitions (including their names, parameters, parameters sets, attributes, etc.) are rich objects, just like every other object in PowerShell. Because of this, we can easily find out which cmdlets have the most parameters. We follow this process to retrieve the …

Continue reading

PowerShell / ConfigMgr: Sendsched.vbs Replacement

Recently, someone posted a PowerShell script, which is intended as a replacement for the SendSched.vbs included in the Microsoft System Center Configuration Manager 2007 Toolkit v2. I took the liberty of cleaning the code up a little bit, and simplifying it to be more PowerShell friendly. Enjoy. # # Script …

Continue reading

PowerShell / ConfigMgr 2012: Check Client Reboot Pending State

Introduction If you’ve worked with Configuration Manager 2007 for very long, you probably know that clients pending reboots can cause you quite a headache. Determining whether or not a client needs a reboot can be a challenging task, and most folks used desired configuration management rules to detect it. Well, …

Continue reading

PowerShell: Shortening Web Service Type Names with a Hashtable

When you use the New-WebServiceProxy class, you probably have noticed that PowerShell dynamically generates some really ugly type names. For example, if we get a reference to the Bing web service (you’ll need to get an API key first): $BingSearch = New-WebServiceProxy -Class BingSearch -Uri "http://api.search.live.net/search.wsdl?AppID=$ApiKey" … and examine the …

Continue reading

Extreme PowerShell / ConfigMgr: Extending Hardware Inventory

Introduction In previous versions of Microsoft System Center Configuration Manager (ConfigMgr / SCCM), a common task for administrators, engineers, and consultants, was to extend the hardware inventory configuration. These inventory extensions were written in Managed Object Format (MOF) and allowed the SCCM client agents to report back a wider array …

Continue reading

PowerShell: Retrieve List of SCCM Site Codes

If you’re using System Center Configuration Manager (SCCM / ConfigMgr) 2007, you may want to discover how many SCCM sites you have from Active Directory. Of course, this assumes that you have Active Directory publishing enabled on your primary sites. When enabled, SCCM automatically places site information underneath the CN=System …

Continue reading