Register
: :
Login
Home
News
Forums
Scripts
User Groups
Resources
About
Forums
Search
Members
Unanswered
Active Topics
Forums
>
Using PowerShell
>
Active Directory
ocs enable users
Last Post 11 Aug 2010 06:47 PM by
Marco Shaw
. 1 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
john
New Member
Posts:3
11 Aug 2010 04:08 PM
I am having issues running this script
import-csv c:\ocsenabled.csv | % {Set-QADUser -identity $_.samaccountname -objectattribute @{'msRTCSIP-ArchivingEnabled'=0; 'msRTCSIP-FederationEnabled'=$false; 'msRTCSIP-InternetAccessEnabled'=$true; 'msRTCSIP-OptionFlags'=256; 'msRTCSIP-PrimaryHomeServer'=$serverpool; 'msRTCSIP-PrimaryUserAddress'=("sip:$_.samaccountname@chop-qa.net"); 'msRTCSIP-UserEnabled'=$true }}
now what happens is the script goes thru sucessfully (without apparent error is better said) but there is an error setting the sip address that becomes apparent when i take a look at the user's ocs properties, which are grayed out. when looking at the OCS 2007 r2 console i find that the users are marked invalid and the sip address is incorrect. to be more specific the msRTCSIP-PrimaryUserAddress attribute does not except the $_.columnheader from import-csv. i assume it has something to do with the syntax but i dont know of another way to do this from a CSV. Please, any suggestions would be much appreciated.
Message was edited by: jpcapone Message was edited by: jpcapone
Marco Shaw
Veteran Member
Posts:1684
11 Aug 2010 06:47 PM
See my reply to see if it helps:
http://social.technet.microsoft.com...702bcccce5
You are not authorized to post a reply.
Using PowerShell
--General PowerShell
--Active Directory
--Exchange Server
--Lync Server
--SharePoint
--SQL Server
--System Center
--Non-Microsoft Products
--Books, Tools, and Videos
--Working with .NET
--Peer Review
--Testing, Testing...
PowerShell Development
--Cmdlet Development
--PSDrive Provider Development
--Hosting the Shell
Looking Ahead
--Using PowerShell v2.0
--Developing for PowerShell v2.0
PowerShellCommunity.org
--Community Announcements and Assistance
--Completely Unrelated
--User Groups
--Community Business
----Suggestion Box
Forums
>
Using PowerShell
>
Active Directory
Active Forums 4.3
Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2