posts-powershell

Quickly Scanning for Malware

If you have Windows Defender installed on your machine, you can use this PowerShell command to run a quick scan on a drive of your choice: PS>...

Enabling PowerShell Remoting with NTLM

By default, PowerShell remoting uses Kerberos authentication and works only in domain environments, and only when you specify computer names, not IP...

Validate Read-Host Input

Beginning in PowerShell 4.0, you can use validators for variable assignments. This gives you a quick and easy way of validating user input, too. The...

Restore PowerShell ISE Defaults

To restore custom settings in PowerShell ISE to factory defaults, try running these lines: $PSise.Options.RestoreDefaults()...

Fixing Remoting Bug

Have you ever tried to enable PowerShell remoting with Enable-PSRemoting, and just got an error complaining about not being able to check the...

Refreshing Icon Cache

Sometimes, Windows Explorer does not show correct icons. When you update to PowerShell 5.0, for example, both PowerShell and PowerShell ISE got new...

Formatting Text Output

If you need to return multiple items in a nicely formatted text report, here is a simple trick: get yourself an ordered hash table (supported in...

Pinging Multiple Systems Fast

Test-Connection can ping multiple computers only sequentially, and it does not let you specify a timeout. So when you need to check a large number...

Test-Connection with Timeout

The Test-Connection cmdlet implements a simple ping to check whether a system responds to an ICMP request. Unfortunately, you cannot specify a...

Finding Current File System Path

PowerShell supports not just the file system, so you can set the current path to a different provider (Set-Location). Here is a trick that always...

1 94 95 96 97 98 237