ps1

Beware of -match

The -match operator is frequently used in scripts however not everyone seems to understand how it really works. It can be a really dangerous filter...

read more

Avoid Add-Member (Part 3)

In the previous tip we looked at a number of clever alternatives to avoid Add-Member when creating your own new objects. While using hash tables to...

read more

Avoid Add-Member (Part 2)

In the previous tip we looked at creating simple data objects, and it became evident that instead of using Add-Member, you can cast a hash table to...

read more

Avoid Add-Member (Part 1)

Often the cmdlet Add-Member is used to create simple objects like this: $user = New-Object -TypeName psobject | Add-Member -MemberType NoteProperty...

read more

Leveraging WMI (Part 2)

In the previous tip we introduced the PowerShell “SmbShare” module which comes with Windows and enables you to manage file shares. We looked at the...

read more

Leveraging WMI (Part 1)

WMI is a Windows technology to query computer details. If you are still using the deprecated Get-WmiObject cmdlet, you should rethink: PS>...

read more

Managing Wi-Fi Profiles

On Windows, you can use old console commands to discover Wi-Fi profiles: PS> netsh wlan show profiles From here, you can even view individual...

read more

Automating User Confirmation

In the previous tip we introduced the PowerShell “SmbShare” module which comes with Windows and enables you to manage file shares. We looked at the...

read more

Resetting Firewall Policy

If you’d like to revert firewall rules to factory defaults on Windows 10 or 11, ask PowerShell to run the appropriate netsh.exe command:...

read more

Managing Bitlocker

Better make sure your local drives on notebooks are encrypted. This protects your personal data in case a notebook gets stolen or is placed into...

read more
1 2 3 126