Showing tag results for PowerTip

Aug 22, 2012
Post comments count0
Post likes count0

PowerTip: Measure the Time for a Command to Complete

Doctor Scripto

Summary: Learn how to measure the time for a Windows PowerShell command to complete.  How can I see how many seconds it takes to retrieve objects from the application log?     (Measure-Command { Get-EventLog application }).totalseconds

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

PowerTip: Create a Record of Your PowerShell Commands

Doctor Scripto

Summary: Use Start-Transcript to create a record of Windows PowerShell commands. How can I create an audit file of all commands that I typed during a Windows PowerShell session?  Use the Start-Transcript command: Start-transcript How can I provide a custom name and location for my Windows PowerShell transcript?  Use t...

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

PowerTip: Using Credentials in PowerShell

Doctor Scripto

Summary: Learn how to find Windows PowerShell cmdlets and providers that support credentials.  How can I find which Windows PowerShell cmdlets support the credential parameter?  Use the Get-Command cmdlet with a command such as: Get-Command -ParameterName credential  How can I find which Windows PowerShell provide...

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

PowerTip: Create a Transcript of Commands in PowerShell

Doctor Scripto

Summary: Learn how to create a transcript of all commands and associated output from within Windows PowerShell. How can I create an audit file of all commands typed during a Windows PowerShell session?  Use the Start-Transcript command: Start-transcript  But I tried to use Start-Transcript in the Windows PowerShell IS...

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

PowerTip: Use PowerShell to Simplify Working with Random Numbers

Doctor Scripto

Summary: Learn about using Windows PowerShell to generate random numbers.  How can I generate a random number?   a. Use the Get-Random cmdlet. b. Use the System.Random .NET Framework class, and call the next() method: ([random]5).next()  How can I generate a random number between the values of 1 and 10?   a....

Scripting Guy!Windows PowerShellPowerTip