PowerShell – Comparing Two Arrays

Find difference in two array $Array1=@("John","Mark") $Array2=@("Mike","Paul","Bill","John","Mark") $ArrayDiff=$Array2 | Where {$Array1 -NotContains $_} Find common in two array $Array1=@("John","Mark") $Array2=@("Mike","Paul","Bill","John","Mark") $ArrayDiff=$Array2 | Where {$Array1 -Contains $_}

Update HKCU Registry from the System Account using PowerShell

If you want to Update HKCU Registry from the System Account for the current logged on user HKEY_USERS hive. Use the below code. I...

PowerShell – Block IP Addresses On Cisco Firewall

Plink, Cisco and PowerShell walk into a bar…wait…I just did that gag. Here is simple script of How to execute command on the Cisco Devices by...