Showing tag results for PowerTip

Aug 27, 2012
Post comments count0
Post likes count0

PowerTip: A Couple Quick PowerShell Array Tricks

Doctor Scripto

Summary:  Learn some quick tricks for using Windows PowerShell arrays.  How can I split the following string in the $a variable? $a = "atl-ws-01,atl-ws-02,atl-ws-03,atl-ws-04"  Use the split method : $b = $a.split(",")    How do I join an array, such as the one in the $a variable shown here?  $a = "...

Scripting Guy!Windows PowerShellPowerTip
Aug 26, 2012
Post comments count0
Post likes count0

PowerTip: Check to See if a Command Completes Properly

Doctor Scripto

Summary:  Learn how to check for proper completion of a Windows PowerShell command.  How can I tell if a Windows PowerShell command completes successfully?                   a. Query the $error automatic variable. If $error[0] reports no in...

Scripting Guy!Windows PowerShellPowerTip
Aug 25, 2012
Post comments count0
Post likes count0

PowerTip: Use PowerShell to Create Color Output from Commands

Doctor Scripto

Summary: Learn to use the Write-Host PowerShell cmdlet to create color output from commands.  Someone told me the Write-Host cmdlet could create color output. Can you give me some samples of acceptable syntax? a. Write-Host -ForegroundColor 12 "hi" b. Write-Host -ForegroundColor 12 "hi" -BackgroundColor white c. Write-Host...

Scripting Guy!Windows PowerShellPowerTip
Aug 24, 2012
Post comments count0
Post likes count0

PowerTip: Create an ASCII File from Inside PowerShell

Doctor Scripto

Summary: Learn how to create an ASCII file from inside Windows PowerShell.  I want to create an ASCII text file to hold the results of the Get-Process cmdlet. How can this be done?                 a. Pipe the results to the Out-File cmdlet and use the -encoding parameter to ...

Scripting Guy!Windows PowerShellPowerTip
Aug 23, 2012
Post comments count0
Post likes count0

PowerTip: Find and Import Modules

Doctor Scripto

Summary: Learn how to find and import Windows PowerShell modules.  I want to get a list of all the modules that are installed with Windows PowerShell on my machine. How can you do this?  Inside a Windows PowerShell console, type the following command: Get-Module -ListAvailable  I want to load all of the modules that are installed wit...

Scripting Guy!Windows PowerShellPowerTip