Difference between revisions of "Powershell"

From MyWiki
Jump to: navigation, search
Line 5: Line 5:
 
The following are examples of configuring the ProxyAddresses atribute :
 
The following are examples of configuring the ProxyAddresses atribute :
 
  $roy = get-qaduser gthom009<br>
 
  $roy = get-qaduser gthom009<br>
  $roy | set-qaduser -objectAttributes @{ProxyAddresses=@{Update=@("SMTP:roy@globomantics.com")}}
+
  $roy | set-qaduser -objectAttributes @{ProxyAddresses=@{Update=@("SMTP:roy@globomantics.com")}}<br>
  $roy | set-qaduser -objectAttributes @{ProxyAddresses=@{Delete=@("SMTP:roy@globomantics.com")}}
+
  $roy | set-qaduser -objectAttributes @{ProxyAddresses=@{Delete=@("SMTP:roy@globomantics.com")}}<br>
  $roy | set-qaduser -objectAttributes @{ProxyAddresses=@{Append=@("smtp:george2@gold.ac.uk")}}  
+
  $roy | set-qaduser -objectAttributes @{ProxyAddresses=@{Append=@("smtp:george2@gold.ac.uk")}} <br>
The following sets the users password.  
+
The following sets the users password. <br>
  Set-QADUser <user> -UserPassword “Password”
+
  Set-QADUser <user> -UserPassword “Password”<br>

Revision as of 13:48, 23 May 2014

Add-PSSnapin Quest.ActiveRoles.ADManagement
To disconnect at the end of session : Disconnect-QADService
$pw = read-host "Enter password" -AsSecureString
connect-QADService -service 'cgs-vsvr-dc02.campus.goldsmiths.ac.uk'-ConnectionAccount 'CAMPUS\da_gthom001'-ConnectionPassword $pw
The following are examples of configuring the ProxyAddresses atribute :

$roy = get-qaduser gthom009
$roy | set-qaduser -objectAttributes @{ProxyAddresses=@{Update=@("SMTP:roy@globomantics.com")}}
$roy | set-qaduser -objectAttributes @{ProxyAddresses=@{Delete=@("SMTP:roy@globomantics.com")}}
$roy | set-qaduser -objectAttributes @{ProxyAddresses=@{Append=@("smtp:george2@gold.ac.uk")}}

The following sets the users password.

Set-QADUser <user> -UserPassword “Password”