Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Configure WinPE Bootstrap.ini Account Details
- If ((Get-WmiObject Win32_Computersystem).partofdomain -eq $True) {
- $TextMessage = Write-Host 'Please Enter an AD Account' -ForegroundColor Green
- Write-Host ' '
- $ADUserName = Read-Host 'Please Enter Service Account'
- $ADUserPassword = Read-Host 'Please Enter Service Account Password'
- Get-Content -Path "D:\ReferenceShare\Control\Bootstrap.ini" | Out-Null
- Add-Content -Value DeployRoot=\\$Env:ComputerName\ReferenceShare$ -Path "D:\ReferenceShare\Control\Bootstrap.ini" -Force
- Add-Content -Value ' ' -Path "D:\ReferenceShare\Control\Bootstrap.ini" -Force
- Add-Content -Value SkipBDDWelcome=YES -Path "D:\ReferenceShare\Control\Bootstrap.ini" -Force
- Add-Content -Value UserID=$ADUserName -Path "D:\ReferenceShare\Control\Bootstrap.ini" -Force
- Add-Content -Value UserPassword="$ADUserPassword" -Path "D:\ReferenceShare\Control\Bootstrap.ini" -Force
- Add-Content -Value UserDomain=$Env:UserDnsDomain -Path "D:\ReferenceShare\Control\Bootstrap.ini" -Force
- Write-Host ' '
- } else {
- $TextMessage = Write-Host 'Please Enter an Local Account' -ForegroundColor Green
- Write-Host ' '
- $ADUserName = Read-Host 'Please Enter Service Account'
- $ADUserPassword = Read-Host 'Please Enter Service Account Password'
- Get-Content -Path "D:\ReferenceShare\Control\Bootstrap.ini" | Out-Null
- Add-Content -Value DeployRoot=\\$Env:ComputerName\ReferenceShare$ -Path "D:\ReferenceShare\Control\Bootstrap.ini" -Force
- Add-Content -Value ' ' -Path "D:\ReferenceShare\Control\Bootstrap.ini" -Force
- Add-Content -Value SkipBDDWelcome=YES -Path "D:\ReferenceShare\Control\Bootstrap.ini" -Force
- Add-Content -Value UserID=$ADUserName -Path "D:\ReferenceShare\Control\Bootstrap.ini" -Force
- Add-Content -Value UserPassword="$ADUserPassword" -Path "D:\ReferenceShare\Control\Bootstrap.ini" -Force
- Add-Content -Value UserDomain=$Env:ComputerName -Path "D:\ReferenceShare\Control\Bootstrap.ini" -Force
- Write-Host ' '
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement