Import-Module ActiveDirectory $users = get-aduser -f {physicalDeliveryOfficeName -eq '07-129'} $i = 0 foreach($users in $users){ $i++ Write-Host $users
The code above is what I am currently working on.
What I am trying to do is find any entry in AD where "physicalDeliveryOfficeName" is equal to a number and NOT a letter. Then I am trying to take the "description" attribute and replace the "physicalDeliveryOfficeName" with the "description" and possibly store the previous "physicalDeliveryOfficeName" in another variable.
Any help would be greatly appreciated!