You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/win_reboot/templates/post_reboot.ps1

9 lines
328 B
PowerShell

if (Test-Path -Path '{{win_output_dir}}\win_reboot_test') {
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' `
-Name PendingFileRenameOperations `
-Value @("\??\{{win_output_dir}}\win_reboot_test`0") `
-PropertyType MultiString
Restart-Computer -Force
exit 1
}