Parameterizing Scripts with PowerShell Data Files

In my previous blog I introduced the Get-Blacklist function which turned a string array into a hashtable for quick comparisons: function Get-Blacklist { param( [string[]]$Blacklist ) $blacklistHash = @{} $Blacklist | % { $blacklistHash[$_] = $true } $blacklistHash } and invoked it thus: . .\Scripts\Get-Blacklist.ps1 @blacklist = Get-Blacklist -Blacklist 'Powershell','Sandbox','sqlccJamie','Graphics','CentinelTest','Backoffice Service Portal' As a rule I … Continue reading Parameterizing Scripts with PowerShell Data Files