Category Archives: Bad Code

Powershell Bad Code #1: Replacing values in hashtable not working

Question: Why this code is not replacing values (9 with 90) in the hashtable ? Not working Working Answer:

Powershell Bad Code #2: Sort-Object not working with filenames

Question: Why this command is not sorting the filenames in ascending order from 1 to 20 ? Not working Working Answer :

Powershell Bad Code #3: Operator “or” in switch statement

Question: Why this code doesn’t display “Found” if the value of the variable $log is 4797 ? Not working