Please enable JavaScript.
Coggle requires JavaScript to display documents.
Home And Profile Final Script, (function New-SamFromParts {, $newSam = New…
-
-
-
-
} catch {
-
Write-Warning "This is likely the Double-Hop or WinRM problem. Run this script from your Domain Controller."
-
try {
-
} -ArgumentList $domain, $newSam, $homeFolderPath -ErrorAction Stop
-
-
-
} catch {
-
Write-Warning "This is likely the Double-Hop or WinRM problem. Run this script from your Domain Controller."
-
-
-
-
-
-
-
-
$homeShare = "Home0$" # The share name (e.g., \WSERVERC\Home$)
$profShare = "Profile0$" # The share name (e.g., \WSERVERC\Profiles$)
-
-
-
-
-
-
-
$newOU = "CN=Users,DC=upbd,DC=edu"
-
-
-
-
-
-
This part is logically correct. If it fails, it's a RUNTIME problem (WinRM / Double-Hop).
-
-
-
-
-
-
-
This part is logically correct. If it fails, it's a RUNTIME problem (WinRM / Double-Hop).
-
$homeFolderPath = Join-Path $homeRoot $newSam # e.g., C:\Home0\jhsmith15
-
-
-
$homeDirectoryPath = "\$server\$homeShare\$newSam" # e.g., \WSERVERC\Home0$\jhsmith15
$profilePath = "\$server\$profShare\$newSam" # e.g., \WSERVERC\Profile0$\jhsmith15
-
-