Skip to content

Commit

Permalink
don't try to disable system restore on servers (chef#1530)
Browse files Browse the repository at this point in the history
Signed-off-by: Corey Hemminger <[email protected]>
  • Loading branch information
Stromweld authored Sep 23, 2023
1 parent da8c149 commit 53462a1
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 2,086 deletions.
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

0 comments on commit 53462a1

Please sign in to comment.