Ajout dela structure MDT dans Infra-LAB
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
$getInfoEtab = Get-InfosEtab
|
||||
$Domain = $getInfoEtab.DnsDomainName
|
||||
|
||||
$ParentRep = Split-Path -Path $PSScriptRoot -Parent
|
||||
|
||||
$user = $env:COMPUTERNAME + '\mdt-depl'
|
||||
$SecureKey = ConvertTo-SecureString (Get-Content $ParentRep\Credential\MDT\Key.txt) -AsPlainText -Force
|
||||
$password = ConvertTo-SecureString -SecureKey $SecureKey -string (Get-Content $ParentRep\Credential\MDT\mdtdepl-CryptPwd.txt)
|
||||
#$password = ConvertTo-SecureString -string $getInfoEtab.WinadminMDP -AsPlainText -Force
|
||||
$credential = New-Object -TypeName system.Management.Automation.PSCredential -ArgumentList $user,$password
|
||||
|
||||
Remove-Computer -ComputerName $env:computername -UnjoinDomainCredential $credential -WorkgroupName WG -Force -PassThru
|
||||
Reference in New Issue
Block a user