Scripting Blog

A place to learn about PowerShell and share stories of automation

PowerTip: Search for Inactive User Accounts in Windows Server 2012 Active Directory

Summary: Learn how to use Windows PowerShell to search for inactive user accounts in Active Directory for Windows Server 2012.  How can I query inactive user accounts in my Windows Server 2012 Active Directory environment?  Charlotte Windows PowerShell user group member Brian Wilhite says: You can use the ...

PowerTip: Select the Next-to-Last Item in a PowerShell Array

Summary:  Learn how to select the next-to-last item in a Windows PowerShell array.  I have a collection of objects in an array, and I need to select the next-to-last item in the array. How can this be done?  Good question … Charlotte Windows PowerShell user group member Brian Wilhite says: Every now and then, there ...

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...