PowerShell Measure Script Performance with Measure-Command
Measure-Command times any PowerShell code block. Learn to benchmark commands, compare two approaches, and find performance bottlenecks.
Commands Tips
Measure-Command times any PowerShell code block. Learn to benchmark commands, compare two approaches, and find performance bottlenecks.
Read-Host prompts users for input in PowerShell scripts. Learn to get text, secure passwords, and validate input with while-loop patterns.
Query Active Directory directly with LDAP using PowerShell’s DirectorySearcher. Useful when the ActiveDirectory module is not available.
WinRM enables PowerShell remoting across your network. Learn to enable it, configure trusted hosts, set up HTTPS, and troubleshoot connection issues.
Corporate networks route web traffic through proxies. Learn to configure PowerShell Invoke-WebRequest with proxy settings, credentials, and bypass lists.
Get-FileHash computes cryptographic hashes to verify file integrity. Learn to generate SHA256 hashes, compare files, and validate downloads.
PowerShell’s built-in archive cmdlets handle ZIP compression without 7-zip. Learn Compress-Archive, Expand-Archive, and common archive patterns.
Both New-Item and mkdir create folders in PowerShell. Learn which is more powerful, when to use each, and how to create nested directories at once.
Get-Content reads raw lines while Import-Csv creates structured objects. Learn which to choose based on your file format and downstream processing needs.
Get-WmiObject is deprecated in PowerShell 7. Learn why CIM is the modern replacement, the protocol differences, and how to migrate your WMI scripts.