$domain = "smb01" $pass = "Titok12345" | ConvertTo-SecureString -asPlainText -Force $user = "$domain\administrator" $credential = New-Object System.Management.Automation.PSCredential($user,$pass) Add-Computer -DomainName $domain -Credential $credential