Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

PowerTip: Determine How Long a PowerShell Command Takes

Summary: Figure out how long a Windows PowerShell command takes to run. (image)  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? (image) Use the Measure-Command cmdlet and specify the code in the –expression script block. Measure-...

Use PowerShell to Explore Process Threads in Windows

Summary: Microsoft Scripting Guy talks about using Windows PowerShell to explore process threads in Windows. (image)  Hey, Scripting Guy! I have a problem. On our system, every once in a while, we have this application where the threads go crazy. I need an easy way to check threads. Can you help? —BC (image)  Hello BC, ...

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

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

Get Exchange Online Mailbox Size in GB

Summary: Microsoft PFE, Brian Jackett, talks about using Windows PowerShell to get Exchange Online Mailbox size in GB. Microsoft Scripting Guy, Ed Wilson, is here. Today I want to welcome back guest blogger, Brian T. Jackett. Brian T. Jackett is a premier field engineer at Microsoft who has specialized in SharePoint development, Project Server...

PowerTip: Find the Number of Entries in Event Logs

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?  (image)  How can you use Windows PowerShell to show how many entries exist in all traditional event logs as well as ETL logs? (image)  Use the Get-WinEvent cmdlet and pass a wild...