Powershell

Using WMI Inheritance

All Versions WMI classes are inherited from each other, and that’s something you can take advantage of. Take this line: PS> Get-WmiObject...

read more

Finding Process Owners

All PowerShell versions To find out who owns a particular process and how many instances are running, try this simple piece of code: $ProcessName =...

read more

Parsing DISM Log File

PowerShell 2.0 and later In your Windows folder, you find all kinds of system log files. One is DISM.log which contains information about the...

read more

Removing AD Group Members

Module ActiveDirectory To remove one or many users from an Active Directory group, try this approach: $user = @() $user += Get-ADUser -Filter { Name...

read more

NULL Values in Arrays

All PowerShell versions Whenever you assign NULL values to array elements, they will count as array elements, but will not be output (after all,...

read more

Finding Out Windows Version

All PowerShell Versions Do you own Windows 8.1 Basic, Pro, or Enterprise? Finding out the Windows version is easy. Finding out the exact subtype is...

read more

Converting Error Numbers

All PowerShell Versions Error numbers that are returned by Windows API calls often appear as very large negative numbers. To give meaning to these...

read more

Creating HTML Colors

All Versions To convert decimal color values to a hexadecimal representation, like the one used in HTML, try this line: PS>...

read more

Getting Help

PowerShell 3.0 and later Provided you have downloaded PowerShell help via Update-Help, you can create yourself an excellent help topic viewer with...

read more
1 69 70 71 72 73 130