Загрузка данных


oxygen:
robocopy C:\Users\useroffice1 \\demolab\share\useroffice2.V6 /E /XJ /R:0 /W:0 /XD "C:\Users\useroffice1\AppData\Local" /XF ntuser.dat.LOG* *.regtrans-ms *.blf

Rename-Item -Force "\\demolab\share\useroffice2.V6\NTUSER.DAT" "NTUSER.MAN"

Get-ChildItem -Force "\\demolab\share\useroffice2.V6\NTUSER.*"

icacls C:\share\useroffice2.V6 /grant "DEMO\useroffice2:(OI)(CI)RX" /T
icacls C:\share\useroffice2.V6 /grant "*S-1-5-11:(OI)(CI)RX" /T

Set-ADUser useroffice2 -ProfilePath "\\demolab\share\useroffice2"
Get-ADUser useroffice2 -Properties ProfilePath | Select-Object Name, ProfilePath

dsmod user "CN=useroffice2,OU=Office,DC=demo,DC=local" -profile \\demolab\share\useroffice2

Get-CimInstance Win32_UserProfile | Where-Object LocalPath -eq 'C:\Users\useroffice2' | Remove-CimInstance