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,65 @@
<job id="Configure-SetAutologonInDomain">
<script language="VBScript" src="..\..\scripts\ZTIUtility.vbs"/>
<script language="VBScript">
'//----------------------------------------------------------------------------
'// Solution: Hydration
'// Purpose: Used to Configure Task Sequence to run as a different user
'// Usage: cscript Configure-SetAutologonInDomain.wsf [/debug:true]
'// Version: 1.5 - February 2, 2019 - Johan Arwidmark
'//
'// This script is provided "AS IS" with no warranties, confers no rights and
'// is not supported by the authors or Deployment Artist.
'//
'//----------------------------------------------------------------------------
'//----------------------------------------------------------------------------
'// Global constant and variable declarations
'//----------------------------------------------------------------------------
Dim iRetVal
'//----------------------------------------------------------------------------
'// Main routine
'//----------------------------------------------------------------------------
'On Error Resume Next
iRetVal = ZTIProcess
ProcessResults iRetVal
On Error Goto 0
Function ZTIProcess()
Dim sAppInstallAccount
Dim sAppInstallPassword
Dim sAppInstallDomain
sAppInstallAccount = oEnvironment.Item("APPINSTALLACCOUNT")
sAppInstallPassword = oEnvironment.Item("APPINSTALLPASSWORD")
sAppInstallDomain = oEnvironment.Item("APPINSTALLDOMAIN")
iRetVal = Success
ZTIProcess = iRetval
oLogging.CreateEntry "Configure - Set Administrator Autologon in Domain: Starting", LogTypeInfo
oShell.RegDelete "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon", "1", "REG_SZ"
oShell.RegDelete "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName", sAppInstallAccount, "REG_SZ"
oShell.RegDelete "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultPassword"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultPassword", sAppInstallPassword, "REG_SZ"
oShell.RegDelete "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultDomainName"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultDomainName", sAppInstallDomain, "REG_SZ"
oShell.RegDelete "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoLogonCount"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoLogonCount", &H000003e7, "REG_DWORD"
Set WScript = CreateObject("WScript.Shell")
WScript.Sleep 120000 'Sleeps for 60 seconds
End Function
</script>
</job>