PoshCode Archive  Artifact [5426c3e699]

Artifact 5426c3e6999cf40c11d67d2df4989f74bd8df35a8f5f5ee701b417a7007f2e63:

  • File Set-OCSUser.ps1 — part of check-in [94742e9a00] at 2018-06-10 12:56:41 on branch trunk — Requires Quest AD cmdlets. This oneliner sets Active Directory user attributes for Microsoft Office Communications Server 2007. (user: Jan Egil Ring size: 1689)

# encoding: ascii
# api: powershell
# title: Set-OCSUser
# description: Requires Quest AD cmdlets. This oneliner sets Active Directory user attributes for Microsoft Office Communications Server 2007.
# version: 1.0
# type: script
# author: Jan Egil Ring
# license: CC0
# x-poshcode-id: 1222
# x-archived: 2016-06-01T11:52:04
# x-published: 2010-07-22T18:23:00
#
# For more info: http://janegilring.wordpress.com/2009/07/23/manage-ocs-users-with-windows-powershell
#
###########################################################################"
#
# NAME: Set-OCSUser.ps1
#
# AUTHOR: Jan Egil Ring
# EMAIL: jan.egil.ring@powershell.no
#
# COMMENT: 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
#
# You have a royalty-free right to use, modify, reproduce, and
# distribute this script file in any way you find useful, provided that
# you agree that the creator, owner above has no warranty, obligations,
# or liability for such use.
#
# VERSION HISTORY:
# 1.0 23.07.2009 - Initial release
#
###########################################################################"

$Username="demo.user"
$Fullname="Demo User"
$serverpool="pool01.ourdomain.com"

$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 }

Set-QADUser $Fullname -oa $oa