PoshCode Logo PowerShell Code Repository

Set-OCSUser by Jan Egil Ring 7 years ago
View followups from Jan Egil Ring | embed code: <script type="text/javascript" src="http://PoshCode.org/embed/1222"></script>download | new post

Requires Quest AD cmdlets. This oneliner sets Active Directory user attributes for Microsoft Office Communications Server 2007.
For more info: http://janegilring.wordpress.com/2009/07/23/manage-ocs-users-with-windows-powershell

  1. ###########################################################################"
  2. #
  3. # NAME: Set-OCSUser.ps1
  4. #
  5. # AUTHOR: Jan Egil Ring
  6. # EMAIL: jan.egil.ring@powershell.no
  7. #
  8. # COMMENT: Requires Quest AD cmdlets. This oneliner sets Active Directory user attributes for Microsoft Office Communications Server 2007.
  9. #          For more info: http://janegilring.wordpress.com/2009/07/23/manage-ocs-users-with-windows-powershell
  10. #
  11. # You have a royalty-free right to use, modify, reproduce, and
  12. # distribute this script file in any way you find useful, provided that
  13. # you agree that the creator, owner above has no warranty, obligations,
  14. # or liability for such use.
  15. #
  16. # VERSION HISTORY:
  17. # 1.0 23.07.2009 - Initial release
  18. #
  19. ###########################################################################"
  20.  
  21. $Username="demo.user"
  22. $Fullname="Demo User"
  23. $serverpool="pool01.ourdomain.com"
  24.  
  25. $oa = @{'msRTCSIP-ArchivingEnabled'=0; 'msRTCSIP-FederationEnabled'=$true; 'msRTCSIP-InternetAccessEnabled'=$true; 'msRTCSIP-OptionFlags'=257; 'msRTCSIP-PrimaryHomeServer'=$serverpool; 'msRTCSIP-PrimaryUserAddress'=("sip:$Username@ourdomain.com"); 'msRTCSIP-UserEnabled'=$true }
  26.  
  27. Set-QADUser $Fullname -oa $oa

Submit a correction or amendment below (
click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:


Remember me