Trying to get a script to work to delete the spaces in some of our users extentionAttribute6 entries.
Get-aduser -filter [extensionAttribute6 -like "*"} | Foreach {Set-aduser -Identity $_.extensionAttribute6 $_.extensionattribute6.TrimEnd()}
I get a "You cannot call a method on a null-valued expression" Error.
Any help would be appreciated!