PowerTip: Use the Get-Cimclass Cmdlet to Find WMI Properties

Summary: Use Windows PowerShell 3.0 to find specific WMI properties.  How do I find what WMI class contains the Service Pack property?  Charlotte PowerShell User Group member Brian Wilhite says: The easiest way to find the WMI class or classes that contain the “Service Pack” property, you’ll use theGet-CimClass cmdlet with the -PropertyName parameter and specify a wild card…


Weekend Scripter: Use PowerShell and WMI Associations to Find User Group Membership

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell and WMI associations to find user group membership. Microsoft Scripting Guy, Ed Wilson, is here. Today is sort of a mellow day. I just finished reading a mystery story called Some Like it Hawk by Donna Andrews. Donna is really a nice person, and…


PowerTip: Use the PowerShell 3.0 Get-CimInstance Cmdlet

Summary: Use Windows PowerShell 3.0 to connect to servers running Windows Server 2003 with the Get-CimInstance cmdlet.  How can I use Get-CimInstance to connect to servers running Windows Server 2003 in my legacy environment?  Charlotte Windows PowerShell user group member Brian Wilhite says: The new CIM cmdlets use the WSMan protocol by default, which isn’t supported on Windows Server 2003. However, you can use the New-CimSessionOption cmdlet with the Protocol parameter…


Weekend Scripter: Use PowerShell to Find Local Administrators on a Computer

Summary: Microsoft Scripting Guy, Ed Wilson, shows how to use Windows PowerShell and WMI CIM associations to find local administrators. Microsoft Scripting Guy, Ed Wilson, is here. Well, we have been really lucky the past couple of days in Charlotte, North Carolina—at least weather wise. Yesterday, it was 60 degrees Fahrenheit and it was sunny…


PowerTip: Use PowerShell to Compare Two Objects

Summary: Use Windows PowerShell to compare two objects to view differences and similarities.  How can I compare two objects and see the values that differ and exist in both?  Charlotte Windows PowerShell User Group member Brian Wilhite says: There is a cmdlet that will make life easy for you. The cmdlet is Compare-Object, and it will compare…


Use PowerShell to Check the Status of Exchange Databases

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to simplify checking the dirty status of Exchange Mailbox databases.  Hey, Scripting Guy!, I have a large number of Exchange servers, and when I do a database restore, often I am unable to mount the database because it says that the database is dirty….


PowerTip: Adjusting the Case of a String

Summary: Use Windows PowerShell to adjust the case of an entire string.  How can I adjust the case of an entire string?  Charlotte PowerShell User Group member Brian Wilhite says: One way to adjust the case (upper or lower) of an entire string object is to call the ToUpper or ToLower methods of the string object. (‘this string should be…


Use PowerShell CIM Cmdlets to Discover WMI Associations

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using the Windows PowerShell 3.0 CIM cmdlets to discover WMI class associations. Microsoft Scripting Guy, Ed Wilson, is here. One of the cool things about the new Windows PowerShell 3.0 CIM cmdlets is the way they enhance WMI discoverability. Indeed, one of the primary questions I get relates back…


PowerTip: Use PowerShell 3.0 to View IP Address Info

Summary: View detailed IP address information for non-virtual network adapters.  How can I obtain detailed IP address information from a non-virtual network adapter?  Charlotte PowerShell User Group member Brian Wilhite says: Luckily, there is a cmdlet that does this very thing.  The Get-NetIPConfiguration cmdlet with the -Detailed parameter will return meaningful IP information for non-virtual network adapters. Get-NetIPConfiguration -Detailed gip…


Create a Custom PowerShell Object to Simplify Appending CSV files

Summary: Microsoft Scripting Guy, Ed Wilson, shows how to create a custom Windows PowerShell object to simplify appending to CSV files.   Hey, Scripting Guy!  Yesterday, you talked about creating two objects, exporting them to CSV files, and then manipulating the strings to combine the CSV files. Is there a cleaner way of doing this? —CS…