powertips

Resolving Mapped Drive

Ever wanted to know the original URL behind network drives? Here is an easy PowerShell way: # make sure the below drive is a mapped network drive #...

read more

Finding Disabled GPOs

Here is a quick one-liner that dumps all Group Policy objects that have all settings disabled: Get-Gpo -All | Where-Object GpoStatus -eq...

read more

Browsing All Event Logs

Get-EventLog always requires you to specify exactly one event log via -LogName. You cannot use wildcards, and you cannot browse all event logs at...

read more

Locking Workstation

If you’d like to lock the current workstation from within PowerShell, you can take advantage of the fact that PowerShell can run executables....

read more

Detecting WinPE

PowerShell can run inside WinPE environments. If you’d like to detect whether your PowerShell script runs inside a WinPE environment, you can...

read more

Dumping ZIP Archive Content

PowerShell comes with new cmdlets like Extract-Archive that can extract (all) files from a ZIP file container. However, there is no way to just list...

read more
1 21 22 23 24 25 122