Showing archive results for October 2014

Oct 3, 2014
Post comments count0
Post likes count0

PowerTip: Change Color of PowerShell Errors

Doctor Scripto

Summary: Learn how to change the color of Windows PowerShell errors.  How can I change the color of Windows PowerShell errors in the Windows PowerShell console?  Use $host.PrivateData and supply a new value for ErrorForegroundColor, for example: $Host.PrivateData.ErrorForegroundColor = 'white'

Scripting Guy!Windows PowerShellPowerTip
Oct 3, 2014
Post comments count0
Post likes count0

Adding Local Users to Local Groups

Doctor Scripto

Summary: Learn how to use Windows PowerShell to add local users to local groups. Microsoft Scripting Guy, Ed Wilson, is here. Creating local user objects and local group objects is fine, but to be useful, I need to be able to add users to groups. When working with local accounts, I need to use the ADSI type accelerator to facilitate the way things...

Scripting Guy!Windows PowerShellother Directory Services
Oct 2, 2014
Post comments count0
Post likes count0

PowerTip: Use PowerShell to Reverse Array

Doctor Scripto

Summary: Easily use Windows PowerShell to reverse an array.  How can I use Windows PowerShell to reverse an array?  Pipe the array to the Sort-Object cmdlet and use the –Descending switch, for example: $a = 1,2,3,4,5 $b = $a | sort -Descending

Scripting Guy!Windows PowerShellPowerTip
Oct 2, 2014
Post comments count0
Post likes count0

Use PowerShell to Create Local Groups

Doctor Scripto

Summary: Microsoft Scripting Guy, Ed Wilson, talks about creating local groups. Microsoft Scripting Guy, Ed Wilson, is here. Creating a local group works exactly the same way as creating a local user account (see Use PowerShell to Create Local User Accounts). The process involves the following steps:   Notes  At this p...

Scripting Guy!Windows PowerShellother Directory Services
Oct 1, 2014
Post comments count0
Post likes count0

PowerTip: Use PowerShell to Create Hash Table to Hold Lowercase Letters

Doctor Scripto

Summary: Use Windows PowerShell to create a hash table that holds all ASCII lowercase letters.  How can I use Windows PowerShell to create a hash table that holds all lowercase ASCII letters?  Create an empty ordered dictionary, and then use the add method to add the numbers 97-122            as key...

Scripting Guy!Windows PowerShellPowerTip