Ajout dela structure MDT dans Infra-LAB

This commit is contained in:
2026-05-24 16:21:20 +02:00
parent fed8d42171
commit 049b03b4d4
522 changed files with 105109 additions and 0 deletions
@@ -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