Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

VIC-DC1

--------------------------------------------------------------------------------
------------
Run bellow commands to give VIC-SVR1 a fullcontrol over
\\VIC-DC1\RDSUserProfiles directory
--------------------------------------------------------------------------------
------------
1. Create folder
New-Item C:\RDSUserProfiles -itemtype directory
2.Share folder with FullAccess to VIC-SVR1
New-SMBShare -Name "RDSUserProfiles" -Path "C:\RDSUserProfiles" -FullAccess
"IT\VIC-SVR1$", "IT\administrator"
3.Save ACL of the shared folder into $acl variable
$acl = Get-Acl C:\RDSUserProfiles
4. Set a FullControl to VIC-SVR1 and save into variable $AccessRule
$AccessRule = New-Object
System.Security.AccessControl.FileSystemAccessRule("IT\VIC-SVR1$","FullControl",
"Allow")
5. $acl to gain the new setting already set in $AccessRule
$acl.SetAccessRule($AccessRule)
6. Excute the new full control settings pf $acl using pipe into sharedfolder
$acl | Set-Acl C:\RDSUserProfiles

You might also like