Showing tag results for PowerTip

Feb 28, 2013
Post comments count0
Post likes count0

PowerTip: Determine How Long a PowerShell Command Takes

Doctor Scripto

Summary: Figure out how long a Windows PowerShell command takes to run.  You want to know how long a particular Windows PowerShell command takes to run so you can optimize your code. How can you do this? Use the Measure-Command cmdlet and specify the code in the –expression script block. Measure-Command -Expression {G...

Scripting Guy!Windows PowerShellPowerTip
Feb 27, 2013
Post comments count0
Post likes count0

PowerTip: Use PowerShell to Easily Find How Long a Process Runs

Doctor Scripto

Summary: Use Windows PowerShell to show easily how long a process runs.  You need to find how long a particular process has been running. How can you easily do this with Windows PowerShell?  Use the New-TimeSpan cmdlet and specify the –Start parameter as the results from Get-Process on a process and the StartTime property. This is s...

Scripting Guy!Windows PowerShellPowerTip
Feb 26, 2013
Post comments count0
Post likes count0

PowerTip: Find the Number of Entries in Event Logs

Doctor Scripto

PowerTip: Find the Number of Entries in Event Logs Summary:  Use Windows PowerShell to find the number of entries in all event logs and ETL logs?   How can you use Windows PowerShell to show how many entries exist in all traditional event logs as well as ETL logs?  Use the Get-WinEvent cmdlet and pass a wild card to the –L...

Scripting Guy!Windows PowerShellPowerTip
Feb 25, 2013
Post comments count0
Post likes count0

PowerTip: Get a Quick Update on Event Log Status via PowerShell

Doctor Scripto

Summary: Use Windows PowerShell to get a quick event log status update.  How can I quickly obtain a status update on my event logs? Things such as the retention policy, overflow action, and numbers of event in the logs? Use the Get-EventLog cmdlet with the * after it, as shown here. Get-EventLog *

Scripting Guy!Windows PowerShellPowerTip
Feb 24, 2013
Post comments count0
Post likes count0

PowerTip: Learn About PowerShell Format Files

Doctor Scripto

Summary:  Learn about Windows PowerShell format files.    Where can I get good information about the various *format.ps1xml files that Windows PowerShell uses?  On Windows PowerShell 3.0, after you have updated Help by running the Update-Help command, use Help to display the format Help content. Here is the c...

Scripting Guy!Windows PowerShellPowerTip