Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Proxyaddresses

$
0
0

Powershell v3.0

 

Currently having an issue when trying to replace proxyaddresses.

1st I get the proxys
$proxys = (get-aduser $username -properties proxyaddresses).proxyaddresses

Then I change the users proxyaddresses through ADUC

I then run the above command again and compare to $proxys to confirm changes have been made

Then
set-aduser $user -replace @{proxyaddresses=$proxys}

This leaves me with no addresses in proxyaddresses. If I then run
get-aduser $username -Properties proxyaddresses | select proxyaddresses
the result is

proxyaddresses
--------------
{}

This should be a relatively simple task yet I cannot seem to get it working.

Any ideas on where I'm going wrong ?  Using PS3.0.

I can complete the task successfully with the Quest cmdlets but am trying to use the ActiveDirectory Module more and more and ween myself off Quest.

Thanks in advance


Viewing all articles
Browse latest Browse all 6937

Latest Images

Trending Articles



Latest Images