Zachary Loeber

The personal website of Zachary Loeber.

OCS 2007 R2: Quick Script

I ran across this in one of the documents I wrote up while doing a side by side migration of our office communication server 2007  pool to 2007 R2. It is a quick script to automate the process of creating and assigning permissions for the shares needed in the front end server installation. I wrote it pretty quickly so use at your own discretion of course. Save as a .cmd or .bat and run directly on the front end server.

Two notes:

–       RTCUniversalServerAdmins and Administrator = Full right on both NTFS and Share level permissions on all folders __

–       Everyone group is removed from all share level permissions except Presentations

 

mkdir c:\OCSShares
mkdir c:\OCSShares\Presentations
mkdir c:\OCSShares\Metadata
mkdir c:\OCSShares\ABS
mkdir c:\OCSShares\Applications
mkdir c:\OCSShares\Updates
mkdir c:\OCSShares\MeetingComp

__

net share Presentations=c:\OCSShares\Presentations /GRANT:NA1\RTCUniversalServerAdmins,FULL /GRANT:administrators,FULL /GRANT:everyone,READ /GRANT:NA1\RTCComponentUniversalServices,FULL /GRANT:NA1\RTCUniversalGuestAccessGroup,READ
icacls c:\OCSShares\Presentations  /GRANT NA1\RTCUniversalServerAdmins:(F)
icacls c:\OCSShares\Presentations  /GRANT administrators:(F)
icacls c:\OCSShares\Presentations  /GRANT everyone:(R)
icacls c:\OCSShares\Presentations  /GRANT NA1\RTCUniversalGuestAccessGroup:(RD)
icacls c:\OCSShares\Presentations  /GRANT NA1\RTCComponentUniversalServices:(M)

__

net share Metadata=c:\OCSShares\Metadata /GRANT:NA1\RTCUniversalServerAdmins,FULL /GRANT:administrators,FULL
/GRANT:NA1\RTCComponentUniversalServices,FULL
icacls c:\OCSShares\Metadata  /GRANT NA1\RTCUniversalServerAdmins:(F)
icacls c:\OCSShares\Metadata  /GRANT NA1\RTCComponentUniversalServices:(F)
icacls c:\OCSShares\Metadata  /GRANT administrators:(F)

__

net share ABS=c:\OCSShares\ABS  /GRANT:NA1\RTCUniversalServerAdmins,FULL /GRANT:administrators,FULL /GRANT:”Authenticated Users”,READ /GRANT:NA1\RTCHSUniversalServices,FULL /GRANT:NA1\RTCUniversalGuestAccessGroup,READ

__

icacls c:\OCSShares\ABS  /GRANT NA1\RTCUniversalServerAdmins:(F)
icacls c:\OCSShares\ABS   /GRANT administrators:(F)
icacls c:\OCSShares\ABS  /GRANT NA1/RTCHSUniversalServices:(M)
icacls c:\OCSShares\ABS  /GRANT NA1/RTCUniversalGuestAccessGroup:(RD)
icacls c:\OCSShares\ABS  /GRANT ”Authenticated Users”:(RD)
 
net share Applications=c:\OCSShares\Applications /GRANT:NA1\RTCUniversalServerAdmins,FULL /GRANT:administrators,FULL
/GRANT:NA1\ RTCComponentUniversalServices,FULL
icacls c:\OCSShares\Applications /GRANT NA1\RTCComponentUniversalServices:(F)
icacls c:\OCSShares\Applications /GRANT NA1\RTCUniversalServerAdmins:(F)
icacls c:\OCSShares\Applications /GRANT administrators:(F)

__

net share Updates=c:\OCSShares\Updates /GRANT:NA1\RTCUniversalServerAdmins,FULL /GRANT:administrators,FULL /GRANT:NA1\RTCHSUniversalServices,READ /GRANT:NA1\RTCUniversalGuestAccessGroup,READ /GRANT:NA1\RTCComponentUniversalServices,FULL

__

icacls c:\OCSShares\Updates /GRANT NA1\RTCUniversalServerAdmins:(F)
icacls c:\OCSShares\Updates /GRANT administrators:(F)
icacls c:\OCSShares\Updates /GRANT NA1\RTCUniversalGuestAccessGroup:(RD)
icacls c:\OCSShares\Updates /GRANT NA1\RTCHSUniversalServices:(RD)

__

net share MeetingComp=c:\OCSShares\MeetingComp /GRANT:NA1\RTCUniversalServerAdmins,FULL /GRANT:administrators,FULL /GRANT:NA1\RTCComponentUniversalServices,FULL

__

icacls c:\OCSShares\MeetingComp /GRANT NA1\RTCUniversalServerAdmins:(F)
icacls c:\OCSShares\MeetingComp /GRANT administrators:(F)
icacls c:\OCSShares\MeetingComp /GRANT NA1\RTCComponentUniversalServices:(M)
comments powered by Disqus