Advertisement
Guest User

Untitled

a guest
Apr 6th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Write-Host "Welcome to the Axxess All-In-One Deployment Script!" -ForegroundColor Yellow
  2. $inventory = Read-Host -Prompt "Enter the last 4 digits of the computer's inventory tag"
  3. $compFullName = "AXDALCELAP" + $inventory
  4.  
  5. Write-Host "Computer's full name will be: $compFullName" -ForegroundColor Yellow
  6.  
  7. $rawUsername = Read-Host "Enter Domain Admin Username"
  8. $domainUsername = "AXXESS\$rawUsername"
  9. $password = Read-Host "Enter Password for $domainUsername (secure)" -AsSecureString
  10.  
  11. $credential = New-Object System.Management.Automation.PSCredential($domainUsername,$password)
  12.  
  13. Add-Computer -ComputerName $compFullName -DomainName "axxess.local" -Credential $credential
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement