Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

Change CustomAttribute value

$
0
0

Hi,

I create a powershell script to update a dynamic distribution group in Exchange 2010.

The script get the member of a users group and for each member the script change the custom attribute 5.

So far this the script :

#importe les commandes specifique a MS Exchange 2010
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 

#importe les commandes spécifique à l'AD
import-module activedirectory 

#declaration varialble
$memberGROUP = Get-ADGroupMember VPN

foreach ($member in $memberGROUP)
	{
		$user = $member.name
		Set-Mailbox -Identity $user -CustomAttribute5 "vpn"	
	}

I would like to test if the "CustomAttribute5" is not equal to "vpn" then if it is true the script change the value to "vpn".

Can you help me ?


Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>