Showing results for September 2012 - Page 5 of 13 - Scripting Blog [archived]

Sep 20, 2012
0
0

PowerTip: Redirect PowerShell Warning Messages to a Text File

Doctor Scripto
Doctor Scripto

Summary: Use the warning redirection operator to redirect Windows PowerShell warning messages to a text file.  How can you prevent warning messages from displaying to the Windows PowerShell host, but instead capture them in a text file?  Use the warning message redirection operator: $WarningPreference = "continue"  Write-Warning "t...

Scripting Guy!Windows PowerShellPowerTip
Sep 20, 2012
0
0

Use PowerShell Redirection Operators for Script Flexibility

Doctor Scripto
Doctor Scripto

Summary: Microsoft Scripting Guy Ed Wilson talks about using the new Windows PowerShell redirectioin operators to add flexibility to a script.  Hey, Scripting Guy! There is something about Windows PowerShell that I don’t get. Normally, I can use the redirection arrows to write to a text file, but sometimes it does not work. Is this a bu...

Scripting Guy!Windows PowerShellscripting techniques
Sep 19, 2012
0
0

PowerTip: Display PowerShell Information One Page at a Time

Doctor Scripto
Doctor Scripto

Summary:  Use the More function to display Windows PowerShell information one page at a time.    How can you cause Windows PowerShell to easily display information one console screen at a time?  Use the More function:             Get-Command –Comman...

Scripting Guy!Windows PowerShellPowerTip
Sep 19, 2012
0
0

Use PowerShell to Create Intelligent Default Values

Doctor Scripto
Doctor Scripto

Summary: Windows PowerShell 3.0 introduces the PSDefaultParameterValues automatic variable, which permits creating custom default values. Microsoft Scripting Guy, Ed Wilson, is here. Life is returning to normal—at least for this week. Next week, the Scripting Wife and I head north where I will be speaking at the Central Ohio PowerShell U...

Scripting Guy!Windows PowerShellscripting techniques
Sep 18, 2012
0
0

PowerTip: Use Show-Command to See PowerShell Parameters

Doctor Scripto
Doctor Scripto

Summary: Use Show-Command to display interactive Windows PowerShell parameter Help.  How do you display the parameters and parameter sets of Windows PowerShell cmdlets in an interactive fashion?  Use the Show-Command cmdlet from the Windows PowerShell console or the Windows PowerShell ISE:      ...

Scripting Guy!Windows PowerShellPowerTip