Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't run disable system restore on windows servers #1530

Merged
merged 2 commits into from
Sep 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions packer_templates/scripts/windows/configure-power 2.ps1

This file was deleted.

17 changes: 0 additions & 17 deletions packer_templates/scripts/windows/disable-screensaver 2.ps1

This file was deleted.

17 changes: 0 additions & 17 deletions packer_templates/scripts/windows/disable-system-restore 2.ps1

This file was deleted.

9 changes: 7 additions & 2 deletions packer_templates/scripts/windows/disable-system-restore.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@ trap {
Exit 1
}

Write-Host 'Disabling System Restore'
Disable-ComputerRestore -Drive "C:\"
$osInfo = Get-CimInstance -ClassName Win32_OperatingSystem
if ($osInfo.ProductType -eq 1)
{
# system-restore isn't on servers
Write-Host 'Disabling System Restore'
Disable-ComputerRestore -Drive "C:\"
}
20 changes: 0 additions & 20 deletions packer_templates/scripts/windows/disable-windows-uac 2.ps1

This file was deleted.

17 changes: 0 additions & 17 deletions packer_templates/scripts/windows/enable-file-sharing 2.ps1

This file was deleted.

259 changes: 0 additions & 259 deletions packer_templates/scripts/windows/remove-one-drive-and-teams 2.ps1

This file was deleted.

Loading