Rexxer

Some tips for me and other

MDT + Script for joining to a domain

$strUser = “domain\user”
$strDomain = “domain.local”
$strPassword = ConvertTo-SecureString “password” -AsPlainText -Force
$Credentials = New-Object System.Management.Automation.PsCredential $strUser,
$strPassword
$strOU = “OU=Computers,DC=domainn,DC=local”

Add-computer -DomainName $strDomain -Credential $Credentials -OUPath $strOU

Comments are currently closed.