User Tools

Site Tools


script:powershell:mdt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
script:powershell:mdt [2020/10/26 18:14]
admin
script:powershell:mdt [2023/06/12 14:50] (current)
admin
Line 10: Line 10:
 #Copy Item from Deployroot #Copy Item from Deployroot
 Copy-Item ​ "​$DeployRoot\Scripts\This.exe"​ -Destination "​C:​\Scripts"​ Copy-Item ​ "​$DeployRoot\Scripts\This.exe"​ -Destination "​C:​\Scripts"​
 +</​sxh>​
 +
 +===== Récupérer le mot de passe dans Unattend.xml =====
 +<sxh powershell>​
 +# Recovery XML Password
 +$StringPassword = ''​
 +$sPassword=[System.Text.Encoding]::​Unicode.GetString([System.Convert]::​FromBase64String($StringPassword))
 +$sPassword=[System.Text.RegularExpressions.Regex]::​Replace($sPassword ,"​AdministratorPassword$",""​)
 +write-host $sPassword
 </​sxh>​ </​sxh>​
script/powershell/mdt.1603732466.txt.gz · Last modified: 2020/10/26 18:14 by admin