ps1

Reading 4K-Hash

Windows operating systems can be uniquely identified by a so-called 4K-Hash: this is a special hash string that is 4000 bytes in size. You can use...

read more

Showing Wi-Fi SSIDs

In the previous tip we illustrated how you can dump all Wi-Fi profile names using netsh.exe. Typically, profile names and SSIDs are identical....

read more

Dumping Wi-Fi Passwords

In the previous tip we used netsh.exe to dump Wi-Fi profiles. Let’s take it a step further and expose the cached passwords: # get cleartext...

read more

Showing Wi-Fi Profiles

PowerShell is not limited to cmdlets and can run executables. For example, there is no built-in cmdlet to list the existing Wi-Fi profiles, but...

read more

Redirecting Streams

PowerShell writes output information to six different streams, and only the output stream is assigned to variables: function Invoke-Test {...

read more

Discarding Streams

PowerShell outputs information via different streams. Warnings are written to a different stream than output, and errors again go to a different...

read more

Discarding (Any) Output

There are (a few) commands in PowerShell that output information to the console no matter what you do. Neither redirection of streams nor assigning...

read more

Removing Empty Properties

WMI and Get-CimInstance can provide you with a lot of useful information but the returned objects often contain a number of empty properties: PS>...

read more

Using Assertions

Often, your code needs to assert certain prerequisites. For example, you may want to ensure that a given folder exists, and use code like this: #...

read more

Wake On LAN

There is no need for external “Wake On LAN” tools. If you want to wake up a network machine, simply tell PowerShell the MAC address of...

read more

Converting Hex Numbers

PowerShell can interactively convert hexadecimal numbers when you prefix “0x”: PS> 0xAB0f 43791 If the hex number is stored in a...

read more
1 11 12 13 14 15 128