ps1

Get German Holidays

Here is a PowerShell function that gets all German holidays, either nationwide or just for your state: function Get-GermanHoliday {    param    (...

read more

Managing File Shares

Creating a new file share for your network requires Administrator privilege and this PowerShell code: $Parameters = @{ Name = "Packages" Path =...

read more

Masked Input

To safely enter input, scripts need to display a masked input. The easiest way to do this is to use Read-Host -AsSecureString: # Read-Host $entered...

read more

Avoid Get-EventLog

Get-EventLog is a highly popular cmdlet in Windows PowerShell. With just a few simple parameters, it reads event logs from the primary Windows event...

read more

Careful with Arrays

Careful with ArraysWith PowerShell you never know whether a cmdlet returns an array or a single object. That’s because PowerShell automatically...

read more

Get Volume IDs (Part 1)

You can query WMI to get a list of your drives volume IDs like so: Get-CimInstance -ClassName Win32_Volume | Select-Object -Property DriveLetter,...

read more
1 2 3 128