diff --git a/packer_templates/scripts/windows/configure-power 2.ps1 b/packer_templates/scripts/windows/configure-power 2.ps1
deleted file mode 100644
index b64d5b782..000000000
--- a/packer_templates/scripts/windows/configure-power 2.ps1
+++ /dev/null
@@ -1,32 +0,0 @@
-Set-StrictMode -Version Latest
-$ProgressPreference = 'SilentlyContinue'
-$ErrorActionPreference = 'Stop'
-
-trap {
- Write-Host
- Write-Host "ERROR: $_"
- ($_.ScriptStackTrace -split '\r?\n') -replace '^(.*)$','ERROR: $1' | Write-Host
- ($_.Exception.ToString() -split '\r?\n') -replace '^(.*)$','ERROR EXCEPTION: $1' | Write-Host
- Write-Host
- Write-Host 'Sleeping for 60m to give you time to look around the virtual machine before self-destruction...'
- Start-Sleep -Seconds (60*60)
- Exit 1
-}
-
-Write-Host 'Set high performance power profile'
-powercfg -setactive '8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c'
-
-Write-Host 'Turn off Hibernation'
-powercfg.exe /hibernate off
-
-Write-Host 'Turn off monitor timeout on AC power'
-powercfg -Change -monitor-timeout-ac 0
-
-Write-Host 'Turn off monitor timeout on DC power'
-powercfg -Change -monitor-timeout-dc 0
-
-Write-Host 'Zero Hibernation File'
-Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Power' -Name HiberFileSizePercent -Type DWORD -Value 0
-
-Write-Host 'Disable Hibernation Mode'
-Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Power' -Name HibernateEnabled -Type DWORD -Value 0
diff --git a/packer_templates/scripts/windows/disable-screensaver 2.ps1 b/packer_templates/scripts/windows/disable-screensaver 2.ps1
deleted file mode 100644
index 4fbbdad2e..000000000
--- a/packer_templates/scripts/windows/disable-screensaver 2.ps1
+++ /dev/null
@@ -1,17 +0,0 @@
-Set-StrictMode -Version Latest
-$ProgressPreference = 'SilentlyContinue'
-$ErrorActionPreference = 'Stop'
-
-trap {
- Write-Host
- Write-Host "ERROR: $_"
- ($_.ScriptStackTrace -split '\r?\n') -replace '^(.*)$','ERROR: $1' | Write-Host
- ($_.Exception.ToString() -split '\r?\n') -replace '^(.*)$','ERROR EXCEPTION: $1' | Write-Host
- Write-Host
- Write-Host 'Sleeping for 60m to give you time to look around the virtual machine before self-destruction...'
- Start-Sleep -Seconds (60*60)
- Exit 1
-}
-
-Write-Host 'Disable the screensaver'
-Set-ItemProperty -Path 'HKCU:\Control Panel\Desktop' -Name ScreenSaveActive -Type DWORD -Value 0
diff --git a/packer_templates/scripts/windows/disable-system-restore 2.ps1 b/packer_templates/scripts/windows/disable-system-restore 2.ps1
deleted file mode 100644
index f3dee15d7..000000000
--- a/packer_templates/scripts/windows/disable-system-restore 2.ps1
+++ /dev/null
@@ -1,17 +0,0 @@
-Set-StrictMode -Version Latest
-$ProgressPreference = 'SilentlyContinue'
-$ErrorActionPreference = 'Stop'
-
-trap {
- Write-Host
- Write-Host "ERROR: $_"
- ($_.ScriptStackTrace -split '\r?\n') -replace '^(.*)$','ERROR: $1' | Write-Host
- ($_.Exception.ToString() -split '\r?\n') -replace '^(.*)$','ERROR EXCEPTION: $1' | Write-Host
- Write-Host
- Write-Host 'Sleeping for 60m to give you time to look around the virtual machine before self-destruction...'
- Start-Sleep -Seconds (60*60)
- Exit 1
-}
-
-Write-Host 'Disabling System Restore'
-Disable-ComputerRestore -Drive "C:\"
diff --git a/packer_templates/scripts/windows/disable-system-restore.ps1 b/packer_templates/scripts/windows/disable-system-restore.ps1
index f3dee15d7..70713fed0 100644
--- a/packer_templates/scripts/windows/disable-system-restore.ps1
+++ b/packer_templates/scripts/windows/disable-system-restore.ps1
@@ -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:\"
+}
diff --git a/packer_templates/scripts/windows/disable-windows-uac 2.ps1 b/packer_templates/scripts/windows/disable-windows-uac 2.ps1
deleted file mode 100644
index 20af5398f..000000000
--- a/packer_templates/scripts/windows/disable-windows-uac 2.ps1
+++ /dev/null
@@ -1,20 +0,0 @@
-Set-StrictMode -Version Latest
-$ProgressPreference = 'SilentlyContinue'
-$ErrorActionPreference = 'Stop'
-
-trap {
- Write-Host
- Write-Host "ERROR: $_"
- ($_.ScriptStackTrace -split '\r?\n') -replace '^(.*)$','ERROR: $1' | Write-Host
- ($_.Exception.ToString() -split '\r?\n') -replace '^(.*)$','ERROR EXCEPTION: $1' | Write-Host
- Write-Host
- Write-Host 'Sleeping for 60m to give you time to look around the virtual machine before self-destruction...'
- Start-Sleep -Seconds (60*60)
- Exit 1
-}
-
-Write-Host 'Disable Windows UAC'
-Set-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name ConsentPromptBehaviorAdmin -Type DWORD -Value 0
-Set-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name PromptOnSecureDesktop -Type DWORD -Value 0
-Set-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name EnableLUA -Type DWORD -Value 0
-Set-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name LocalAccountTokenFilterPolicy -Type DWORD -Value 1
diff --git a/packer_templates/scripts/windows/enable-file-sharing 2.ps1 b/packer_templates/scripts/windows/enable-file-sharing 2.ps1
deleted file mode 100644
index fefc29d9d..000000000
--- a/packer_templates/scripts/windows/enable-file-sharing 2.ps1
+++ /dev/null
@@ -1,17 +0,0 @@
-Set-StrictMode -Version Latest
-$ProgressPreference = 'SilentlyContinue'
-$ErrorActionPreference = 'Stop'
-
-trap {
- Write-Host
- Write-Host "ERROR: $_"
- ($_.ScriptStackTrace -split '\r?\n') -replace '^(.*)$','ERROR: $1' | Write-Host
- ($_.Exception.ToString() -split '\r?\n') -replace '^(.*)$','ERROR EXCEPTION: $1' | Write-Host
- Write-Host
- Write-Host 'Sleeping for 60m to give you time to look around the virtual machine before self-destruction...'
- Start-Sleep -Seconds (60*60)
- Exit 1
-}
-
-Write-Host 'Enable filesharing'
-Enable-NetFirewallRule -DisplayGroup "File and Printer Sharing"
diff --git a/packer_templates/scripts/windows/remove-one-drive-and-teams 2.ps1 b/packer_templates/scripts/windows/remove-one-drive-and-teams 2.ps1
deleted file mode 100644
index f3724d959..000000000
--- a/packer_templates/scripts/windows/remove-one-drive-and-teams 2.ps1
+++ /dev/null
@@ -1,259 +0,0 @@
-Set-StrictMode -Version Latest
-$ProgressPreference = 'SilentlyContinue'
-$ErrorActionPreference = 'Stop'
-trap {
- Write-Host
- Write-Host "ERROR: $_"
- ($_.ScriptStackTrace -split '\r?\n') -replace '^(.*)$','ERROR: $1' | Write-Host
- ($_.Exception.ToString() -split '\r?\n') -replace '^(.*)$','ERROR EXCEPTION: $1' | Write-Host
- Write-Host
- Write-Host 'Sleeping for 60m to give you time to look around the virtual machine before self-destruction...'
- Start-Sleep -Seconds (60*60)
- Exit 1
-}
-
-Write-Host 'Removing OneDrive'
-function force-mkdir($path) {
- if (!(Test-Path $path)) {
- #Write-Host "-- Creating full path to: " $path -ForegroundColor White -BackgroundColor DarkGreen
- New-Item -ItemType Directory -Force -Path $path
- }}
-
-function Takeown-Registry($key) {
- # TODO does not work for all root keys yet
- switch ($key.split('\')[0]) {
- "HKEY_CLASSES_ROOT" {
- $reg = [Microsoft.Win32.Registry]::ClassesRoot
- $key = $key.substring(18)
- }
- "HKEY_CURRENT_USER" {
- $reg = [Microsoft.Win32.Registry]::CurrentUser
- $key = $key.substring(18)
- }
- "HKEY_LOCAL_MACHINE" {
- $reg = [Microsoft.Win32.Registry]::LocalMachine
- $key = $key.substring(19)
- }
- }
-
- # get administraor group
- $admins = New-Object System.Security.Principal.SecurityIdentifier("S-1-5-32-544")
- $admins = $admins.Translate([System.Security.Principal.NTAccount])
-
- # set owner
- $key = $reg.OpenSubKey($key, "ReadWriteSubTree", "TakeOwnership")
- $acl = $key.GetAccessControl()
- $acl.SetOwner($admins)
- $key.SetAccessControl($acl)
-
- # set FullControl
- $acl = $key.GetAccessControl()
- $rule = New-Object System.Security.AccessControl.RegistryAccessRule($admins, "FullControl", "Allow")
- $acl.SetAccessRule($rule)
- $key.SetAccessControl($acl)
-}
-
-function Takeown-File($path) {
- takeown.exe /A /F $path
- $acl = Get-Acl $path
-
- # get administraor group
- $admins = New-Object System.Security.Principal.SecurityIdentifier("S-1-5-32-544")
- $admins = $admins.Translate([System.Security.Principal.NTAccount])
-
- # add NT Authority\SYSTEM
- $rule = New-Object System.Security.AccessControl.FileSystemAccessRule($admins, "FullControl", "None", "None", "Allow")
- $acl.AddAccessRule($rule)
-
- Set-Acl -Path $path -AclObject $acl
-}
-
-function Takeown-Folder($path) {
- Takeown-File $path
- foreach ($item in Get-ChildItem $path) {
- if (Test-Path $item -PathType Container) {
- Takeown-Folder $item.FullName
- } else {
- Takeown-File $item.FullName
- }
- }
-}
-
-function Elevate-Privileges {
- param($Privilege)
- $Definition = @"
- using System;
- using System.Runtime.InteropServices;
- public class AdjPriv {
- [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)]
- internal static extern bool AdjustTokenPrivileges(IntPtr htok, bool disall, ref TokPriv1Luid newst, int len, IntPtr prev, IntPtr rele);
- [DllImport("advapi32.dll", ExactSpelling = true, SetLastError = true)]
- internal static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr phtok);
- [DllImport("advapi32.dll", SetLastError = true)]
- internal static extern bool LookupPrivilegeValue(string host, string name, ref long pluid);
- [StructLayout(LayoutKind.Sequential, Pack = 1)]
- internal struct TokPriv1Luid {
- public int Count;
- public long Luid;
- public int Attr;
- }
- internal const int SE_PRIVILEGE_ENABLED = 0x00000002;
- internal const int TOKEN_QUERY = 0x00000008;
- internal const int TOKEN_ADJUST_PRIVILEGES = 0x00000020;
- public static bool EnablePrivilege(long processHandle, string privilege) {
- bool retVal;
- TokPriv1Luid tp;
- IntPtr hproc = new IntPtr(processHandle);
- IntPtr htok = IntPtr.Zero;
- retVal = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, ref htok);
- tp.Count = 1;
- tp.Luid = 0;
- tp.Attr = SE_PRIVILEGE_ENABLED;
- retVal = LookupPrivilegeValue(null, privilege, ref tp.Luid);
- retVal = AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);
- return retVal;
- }
- }
-"@
- $ProcessHandle = (Get-Process -id $pid).Handle
- $type = Add-Type $definition -PassThru
- $type[0]::EnablePrivilege($processHandle, $Privilege)
-}
-
-Write-Host "73 OneDrive process and explorer"
-taskkill.exe /F /IM "OneDrive.exe"
-taskkill.exe /F /IM "explorer.exe"
-
-Write-Host "Remove OneDrive"
-if (Test-Path "$env:systemroot\System32\OneDriveSetup.exe") {
- & "$env:systemroot\System32\OneDriveSetup.exe" /uninstall
-}
-if (Test-Path "$env:systemroot\SysWOW64\OneDriveSetup.exe") {
- & "$env:systemroot\SysWOW64\OneDriveSetup.exe" /uninstall
-}
-
-Write-Host "Disable OneDrive via Group Policies"
-force-mkdir "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\OneDrive"
-Set-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\OneDrive" -Name DisableFileSyncNGSC -Value 1
-
-Write-Host "Removing OneDrive leftovers trash"
-rm -Recurse -Force -ErrorAction SilentlyContinue "$env:localappdata\Microsoft\OneDrive"
-rm -Recurse -Force -ErrorAction SilentlyContinue "$env:programdata\Microsoft OneDrive"
-rm -Recurse -Force -ErrorAction SilentlyContinue "C:\OneDriveTemp"
-
-Write-Host "Remove Onedrive from explorer sidebar"
-New-PSDrive -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" -Name "HKCR"
-mkdir -Force "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}"
-Set-ItemProperty "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" -Name System.IsPinnedToNameSpaceTree -Value 0
-mkdir -Force "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}"
-Set-ItemProperty "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" -Name System.IsPinnedToNameSpaceTree -Value 0
-Remove-PSDrive "HKCR"
-
-Write-Host "Removing run option for new users"
-reg load "hku\Default" "C:\Users\Default\NTUSER.DAT"
-reg delete "HKEY_USERS\Default\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "OneDriveSetup" /f
-reg unload "hku\Default"
-
-Write-Host "Removing startmenu junk entry"
-rm -Force -ErrorAction SilentlyContinue "$env:userprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk"
-
-Write-Host "Restarting explorer..."
-start "explorer.exe"
-
-Write-Host "Wait for EX reload.."
-sleep 15
-
-Write-Host "Removing additional OneDrive leftovers"
-foreach ($item in (ls "$env:WinDir\WinSxS\*onedrive*")) {
- Takeown-Folder $item.FullName
- rm -Recurse -Force $item.FullName -ErrorAction SilentlyContinue
-}
-
-###########################################################################################
-Write-Host "Removing Teams"
-# Clearing Teams Cache by Mark Vale
-# Uninstall Teams by Rudy Mens
-
-Write-Host "Stopping Teams Process" -ForegroundColor Yellow
-try{
- Get-Process -ProcessName Teams | Stop-Process -Force
- Start-Sleep -Seconds 3
- Write-Host "Teams Process Sucessfully Stopped" -ForegroundColor Green
-}catch{
- Write-Host $_
-}
-
-Write-Host "Clearing Teams Disk Cache" -ForegroundColor Yellow
-try{
- Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\application cache\cache" | Remove-Item -Confirm:$false
- Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\blob_storage" | Remove-Item -Confirm:$false
- Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\databases" | Remove-Item -Confirm:$false
- Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\cache" | Remove-Item -Confirm:$false
- Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\gpucache" | Remove-Item -Confirm:$false
- Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\Indexeddb" | Remove-Item -Confirm:$false
- Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\Local Storage" | Remove-Item -Confirm:$false
- Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\tmp" | Remove-Item -Confirm:$false
- Write-Host "Teams Disk Cache Cleaned" -ForegroundColor Green
-}catch{
- Write-Host $_
-}
-
-Write-Host "Stopping IE Process" -ForegroundColor Yellow
-try{
- Get-Process -ProcessName MicrosoftEdge | Stop-Process -Force
- Get-Process -ProcessName IExplore | Stop-Process -Force
- Write-Host "Internet Explorer and Edge Processes Sucessfully Stopped" -ForegroundColor Green
-}catch{
- Write-Host $_
-}
-
-Write-Host "Clearing IE Cache" -ForegroundColor Yellow
-try{
- RunDll32.exe InetCpl.cpl, ClearMyTracksByProcess 8
- RunDll32.exe InetCpl.cpl, ClearMyTracksByProcess 2
- Write-Host "IE and Edge Cleaned" -ForegroundColor Green
-}catch{
- Write-Host $_
-}
-Write-Host "Cleanup Complete..."
-
-
-Write-Host "Removing Teams Machine-wide Installer"
-try
-{
- $MachineWide = Get-WmiObject -Class Win32_Product | Where-Object{$_.Name -eq "Teams Machine-Wide Installer"}
- $MachineWide.Uninstall()
-}
-catch
-{
- Write-Warning $_
-}
-
-function unInstallTeams($path) {
- $clientInstaller = "$($path)\Update.exe"
- try {
- $process = Start-Process -FilePath "$clientInstaller" -ArgumentList "--uninstall /s" -PassThru -Wait -ErrorAction STOP
- if ($process.ExitCode -ne 0)
- {
- Write-Warning "UnInstallation failed with exit code $($process.ExitCode)."
- }
- }
- catch {
- Write-Warning $_.Exception.Message
- }
-}
-
-#Locate installation folder
-$localAppData = "$($env:LOCALAPPDATA)\Microsoft\Teams"
-$programData = "$($env:ProgramData)\$($env:USERNAME)\Microsoft\Teams"
-
-If (Test-Path "$($localAppData)\Current\Teams.exe")
-{
- unInstallTeams($localAppData)
-}
-elseif (Test-Path "$($programData)\Current\Teams.exe") {
- unInstallTeams($programData)
-}
-else {
- Write-Warning "Teams installation not found"
-}
diff --git a/packer_templates/scripts/windows/ui-tweaks 2.ps1 b/packer_templates/scripts/windows/ui-tweaks 2.ps1
deleted file mode 100644
index 3982f0a98..000000000
--- a/packer_templates/scripts/windows/ui-tweaks 2.ps1
+++ /dev/null
@@ -1,65 +0,0 @@
-Set-StrictMode -Version Latest
-$ProgressPreference = 'SilentlyContinue'
-$ErrorActionPreference = 'Stop'
-
-trap {
- Write-Host
- Write-Host "ERROR: $_"
- ($_.ScriptStackTrace -split '\r?\n') -replace '^(.*)$','ERROR: $1' | Write-Host
- ($_.Exception.ToString() -split '\r?\n') -replace '^(.*)$','ERROR EXCEPTION: $1' | Write-Host
- Write-Host
- Write-Host 'Sleeping for 60m to give you time to look around the virtual machine before self-destruction...'
- Start-Sleep -Seconds (60*60)
- Exit 1
-}
-
-@(
- # Show file extensions
- {Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name HideFileExt -Type DWORD -Value 0}
- # Show hidden files
- {Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name Hidden -Type DWORD -Value 1}
- # Launch explorer to the PC not the user
- {Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name LaunchTo -Type DWORD -Value 1}
- {Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name FullPathAddress -Type DWORD -Value 1}
- # Disable notification popups
- {Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name EnableBalloonTips -Type DWORD -Value 0}
- # Disable error reporting popups
- {Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\Windows Error Reporting' -Name DontShowUI -Type DWORD -Value 0}
- # Disable prompting for a shutdown reason
- {Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Reliability' -Name ShutdownReasonOn -Type DWORD -Value 0}
- # Set visual effects to best performance
- {Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects' -Name VisualFXSetting -Type DWORD -Value 2}
- # Dont use visual styles on windows and buttons
- {Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\ThemeManager' -Name ThemeActive -Type DWORD -Value 1}
- # Dont use common tasks in folders
- {Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name WebView -Type DWORD -Value 0}
- # Dont use drop shadows for icon labels on the desktop
- {Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name ListviewShadow -Type DWORD -Value 0}
- # Dont use a background image for each folder type
- {Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name ListviewWatermark -Type DWORD -Value 0}
- # Dont slide taskbar buttons
- {Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name TaskbarAnimations -Type DWORD -Value 0}
- # Dont animate windows when minimizing and maximizing
- {Set-ItemProperty -Path 'HKCU:\Control Panel\Desktop\WindowMetrics' -Name MinAnimate -Type STRING -Value 0}
- # Dont show window contents while dragging
- {Set-ItemProperty -Path 'HKCU:\Control Panel\Desktop' -Name DragFullWindows -Type STRING -Value 0}
- # Dont Smooth edges of screen fonts
- {Set-ItemProperty -Path 'HKCU:\Control Panel\Desktop' -Name FontSmoothing -Type STRING -Value 0}
- # Dont smooth scroll list boxes
- # Dont slide open combo boxes
- # Dont fade or slide menus into view
- # Dont show shadows under mouse pointer
- # Dont fade or slide tooltips into view
- # Dont fade out menu items after clicking
- # Dont show shadows under menus
- {Set-ItemProperty -Path 'HKCU:\Control Panel\Desktop' -Name UserPreferencesMask -Type BINARY -Value (90,12,01,80)}
-) | ForEach-Object {
- try
- {
- Invoke-Command -ScriptBlock $_
- }
- catch
- {
- Write-Host "WARN Failed to run: $_"
- }
-}
diff --git a/packer_templates/win_answer_files/10/hyperv-gen2/Autounattend 2.xml b/packer_templates/win_answer_files/10/hyperv-gen2/Autounattend 2.xml
deleted file mode 100644
index 4465d46ea..000000000
--- a/packer_templates/win_answer_files/10/hyperv-gen2/Autounattend 2.xml
+++ /dev/null
@@ -1,320 +0,0 @@
-
-
-
-
-
-
- F:\viostor\w10\amd64
-
-
- F:\NetKVM\w10\amd64
-
-
- F:\Balloon\w10\amd64
-
-
- F:\pvpanic\w10\amd64
-
-
- F:\qemupciserial\w10\amd64
-
-
- F:\qxldod\w10\amd64
-
-
- F:\vioinput\w10\amd64
-
-
- F:\viorng\w10\amd64
-
-
- F:\vioscsi\w10\amd64
-
-
- F:\vioserial\w10\amd64
-
-
-
-
-
- en-US
-
- en-US
- en-US
- en-US
- en-US
- en-US
-
-
-
-
-
-
- 1
- 350
- Primary
-
-
- 2
- 100
- EFI
-
-
- 3
- 128
- MSR
-
-
- 4
- true
- Primary
-
-
-
-
- 1
- 1
-
- NTFS
- de94bba4-06d1-4d40-a16a-bfd50179d6ac
-
-
- 2
- 2
-
- FAT32
-
-
- 3
- 3
-
-
- 4
- 4
-
- NTFS
-
-
- 0
- true
-
- OnError
-
-
-
-
-
- /IMAGE/NAME
- Windows 10 Enterprise Evaluation
-
-
-
- 0
- 4
-
-
-
-
-
- OnError
-
- true
- Vagrant
- Bento by Chef Software, Inc.
-
-
- false
-
-
-
-
-
- 1
-
-
- false
- false
-
-
-
-
- en-US
- en-US
- en-US
- en-US
-
-
-
- true
- true
- true
- true
- true
- Work
- 3
- true
- true
-
- true
- true
- true
-
-
- UTC
-
-
- vagrant
- true
-
-
-
-
- vagrant
- true
-
- Vagrant User
- vagrant
- administrators
- vagrant
-
-
-
-
-
- vagrant
- true
-
- vagrant
- true
-
-
-
- %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
- Set Execution Policy 64 Bit
- 1
-
-
- %windir%\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
- Set Execution Policy 32 Bit
- 2
-
-
- 3
- %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory "Private"
- Sets detected network connections to private to allow start of winrm
-
-
- 4
- %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP" -RemoteAddress Any
- Allows winrm over public profile interfaces
-
-
- 5
- %windir%\System32\cmd.exe /c winrm quickconfig -q
- winrm quickconfig -q
-
-
- 6
- %windir%\System32\cmd.exe /c winrm quickconfig -transport:http
- winrm quickconfig -transport:http
-
-
- 7
- %windir%\System32\cmd.exe /c winrm set winrm/config @{MaxTimeoutms="1800000"}
- Win RM MaxTimoutms
-
-
- 8
- %windir%\System32\cmd.exe /c winrm set winrm/config/winrs @{MaxMemoryPerShellMB="2048"}
- Win RM MaxMemoryPerShellMB
-
-
- 9
- %windir%\System32\cmd.exe /c winrm set winrm/config/service @{AllowUnencrypted="true"}
- Win RM AllowUnencrypted
-
-
- 10
- %windir%\System32\cmd.exe /c winrm set winrm/config/service/auth @{Basic="true"}
- Win RM auth Basic
-
-
- 11
- %windir%\System32\cmd.exe /c winrm set winrm/config/client/auth @{Basic="true"}
- Win RM client auth Basic
-
-
- 12
- %windir%\System32\cmd.exe /c winrm set winrm/config/listener?Address=*+Transport=HTTP @{Port="5985"}
- Win RM listener Address/Port
-
-
- 13
- %windir%\System32\cmd.exe /c netsh firewall add portopening TCP 5985 "Port 5985"
- Win RM port open
-
-
- 14
- %windir%\System32\cmd.exe /c net stop winrm
- Stop Win RM Service
-
-
- 15
- %windir%\System32\cmd.exe /c sc config winrm start= auto
- Win RM Autostart
-
-
- 16
- %windir%\System32\cmd.exe /c net start winrm
- Start Win RM Service
-
-
- 17
- %windir%\System32\cmd.exe /c wmic useraccount where "name='vagrant'" set PasswordExpires=FALSE
- Disable password expiration for vagrant user
-
-
-
-
- true
-
-
-
-
- 1
-
-
- false
-
-
-
-
- true
- Windows Remote Management
- all
-
-
- true
- Remote Administration
- all
-
-
-
-
- 0
-
-
- true
-
-
-
-
- false
-
-
-
diff --git a/packer_templates/win_answer_files/11/hyperv-gen2/Autounattend 2.xml b/packer_templates/win_answer_files/11/hyperv-gen2/Autounattend 2.xml
deleted file mode 100644
index 65a4caaa3..000000000
--- a/packer_templates/win_answer_files/11/hyperv-gen2/Autounattend 2.xml
+++ /dev/null
@@ -1,341 +0,0 @@
-
-
-
-
-
-
-
- F:\viostor\w11\amd64
-
-
- F:\NetKVM\w11\amd64
-
-
- F:\Balloon\w11\amd64
-
-
- F:\pvpanic\w11\amd64
-
-
- F:\qemupciserial\w11\amd64
-
-
- F:\qxldod\w11\amd64
-
-
- F:\vioinput\w11\amd64
-
-
- F:\viorng\w11\amd64
-
-
- F:\vioscsi\w11\amd64
-
-
- F:\vioserial\w11\amd64
-
-
-
-
-
- en-US
-
- en-US
- en-US
- en-US
- en-US
- en-US
-
-
-
-
- 1
- %windir%\System32\reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f
-
-
- 2
- %windir%\System32\reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f
-
-
-
-
-
-
- 1
- 350
- Primary
-
-
- 2
- 100
- EFI
-
-
- 3
- 128
- MSR
-
-
- 4
- true
- Primary
-
-
-
-
- 1
- 1
-
- NTFS
- de94bba4-06d1-4d40-a16a-bfd50179d6ac
-
-
- 2
- 2
-
- FAT32
-
-
- 3
- 3
-
-
- 4
- 4
-
- NTFS
-
-
- 0
- true
-
- OnError
-
-
-
-
-
- /IMAGE/NAME
- Windows 11 Enterprise Evaluation
-
-
-
- 0
- 4
-
-
-
-
-
- OnError
-
- true
- Vagrant
- Bento by Chef Software, Inc.
-
-
- false
-
-
-
-
-
- 1
-
-
- false
- false
-
-
-
-
- en-US
- en-US
- en-US
- en-US
-
-
-
- true
- true
- true
- true
- true
- Work
- 3
- true
- true
-
- true
- true
- true
-
-
- UTC
-
-
- vagrant
- true
-
-
-
-
- vagrant
- true
-
- Vagrant User
- vagrant
- administrators
- vagrant
-
-
-
-
-
- vagrant
- true
-
- vagrant
- true
-
-
-
- %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
- Set Execution Policy 64 Bit
- 1
-
-
- %windir%\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
- Set Execution Policy 32 Bit
- 2
-
-
- 3
- %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory "Private"
- Sets detected network connections to private to allow start of winrm
-
-
- 4
- %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP" -RemoteAddress Any
- Allows winrm over public profile interfaces
-
-
- 5
- %windir%\System32\cmd.exe /c winrm quickconfig -q
- winrm quickconfig -q
-
-
- 6
- %windir%\System32\cmd.exe /c winrm quickconfig -transport:http
- winrm quickconfig -transport:http
-
-
- 7
- %windir%\System32\cmd.exe /c winrm set winrm/config @{MaxTimeoutms="1800000"}
- Win RM MaxTimoutms
-
-
- 8
- %windir%\System32\cmd.exe /c winrm set winrm/config/winrs @{MaxMemoryPerShellMB="2048"}
- Win RM MaxMemoryPerShellMB
-
-
- 9
- %windir%\System32\cmd.exe /c winrm set winrm/config/service @{AllowUnencrypted="true"}
- Win RM AllowUnencrypted
-
-
- 10
- %windir%\System32\cmd.exe /c winrm set winrm/config/service/auth @{Basic="true"}
- Win RM auth Basic
-
-
- 11
- %windir%\System32\cmd.exe /c winrm set winrm/config/client/auth @{Basic="true"}
- Win RM client auth Basic
-
-
- 12
- %windir%\System32\cmd.exe /c winrm set winrm/config/listener?Address=*+Transport=HTTP @{Port="5985"}
- Win RM listener Address/Port
-
-
- 13
- %windir%\System32\cmd.exe /c netsh firewall add portopening TCP 5985 "Port 5985"
- Win RM port open
-
-
- 14
- %windir%\System32\cmd.exe /c net stop winrm
- Stop Win RM Service
-
-
- 15
- %windir%\System32\cmd.exe /c sc config winrm start= auto
- Win RM Autostart
-
-
- 16
- %windir%\System32\cmd.exe /c net start winrm
- Start Win RM Service
-
-
- 17
- %windir%\System32\cmd.exe /c wmic useraccount where "name='vagrant'" set PasswordExpires=FALSE
- Disable password expiration for vagrant user
-
-
- %SystemRoot%\System32\reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d "vagrant" /f
- 18
- Enable AutoLogon
-
-
- %SystemRoot%\System32\reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f
- 19
- Enable AutoLogon
-
-
-
-
- true
-
-
-
-
- 1
-
-
- false
-
-
-
-
- true
- Windows Remote Management
- all
-
-
- true
- Remote Administration
- all
-
-
-
-
- 0
-
-
- true
-
-
-
-
- false
-
-
-
diff --git a/packer_templates/win_answer_files/2016/hyperv-gen2/Autounattend 2.xml b/packer_templates/win_answer_files/2016/hyperv-gen2/Autounattend 2.xml
deleted file mode 100644
index 64579c515..000000000
--- a/packer_templates/win_answer_files/2016/hyperv-gen2/Autounattend 2.xml
+++ /dev/null
@@ -1,332 +0,0 @@
-
-
-
-
-
-
-
- F:\viostor\2k16\amd64
-
-
- F:\NetKVM\2k16\amd64
-
-
- F:\Balloon\2k16\amd64
-
-
- F:\pvpanic\2k16\amd64
-
-
- F:\qemupciserial\2k16\amd64
-
-
- F:\qxldod\2k16\amd64
-
-
- F:\vioinput\2k16\amd64
-
-
- F:\viorng\2k16\amd64
-
-
- F:\vioscsi\2k16\amd64
-
-
- F:\vioserial\2k16\amd64
-
-
-
-
-
- en-US
-
- en-US
- en-US
- en-US
- en-US
- en-US
-
-
-
-
-
-
- 1
- 350
- Primary
-
-
- 2
- 100
- EFI
-
-
- 3
- 128
- MSR
-
-
- 4
- true
- Primary
-
-
-
-
- 1
- 1
-
- NTFS
- de94bba4-06d1-4d40-a16a-bfd50179d6ac
-
-
- 2
- 2
-
- FAT32
-
-
- 3
- 3
-
-
- 4
- 4
-
- NTFS
-
-
- 0
- true
-
- OnError
-
-
-
-
-
- /IMAGE/NAME
- Windows Server 2016 SERVERSTANDARD
-
-
-
- 0
- 4
-
-
-
-
-
- OnError
-
- true
- Vagrant
- Bento by Chef Software, Inc.
-
-
- false
-
-
-
-
-
- 1
-
-
- false
- false
-
-
-
-
- en-US
- en-US
- en-US
- en-US
-
-
-
- true
- true
- true
- true
- true
- Work
- 3
- true
- true
-
- true
- true
- true
-
-
- UTC
-
-
- vagrant
- true
-
-
-
-
- vagrant
- true
-
- Vagrant User
- vagrant
- administrators
- vagrant
-
-
-
-
-
- vagrant
- true
-
- vagrant
- true
-
-
-
- %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
- Set Execution Policy 64 Bit
- 1
-
-
- %windir%\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
- Set Execution Policy 32 Bit
- 2
-
-
- 3
- %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory "Private"
- Sets detected network connections to private to allow start of winrm
-
-
- 4
- %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP" -RemoteAddress Any
- Allows winrm over public profile interfaces
-
-
- 5
- %windir%\System32\cmd.exe /c winrm quickconfig -q
- winrm quickconfig -q
-
-
- 6
- %windir%\System32\cmd.exe /c winrm quickconfig -transport:http
- winrm quickconfig -transport:http
-
-
- 7
- %windir%\System32\cmd.exe /c winrm set winrm/config @{MaxTimeoutms="1800000"}
- Win RM MaxTimoutms
-
-
- 8
- %windir%\System32\cmd.exe /c winrm set winrm/config/winrs @{MaxMemoryPerShellMB="2048"}
- Win RM MaxMemoryPerShellMB
-
-
- 9
- %windir%\System32\cmd.exe /c winrm set winrm/config/service @{AllowUnencrypted="true"}
- Win RM AllowUnencrypted
-
-
- 10
- %windir%\System32\cmd.exe /c winrm set winrm/config/service/auth @{Basic="true"}
- Win RM auth Basic
-
-
- 11
- %windir%\System32\cmd.exe /c winrm set winrm/config/client/auth @{Basic="true"}
- Win RM client auth Basic
-
-
- 12
- %windir%\System32\cmd.exe /c winrm set winrm/config/listener?Address=*+Transport=HTTP @{Port="5985"}
- Win RM listener Address/Port
-
-
- 13
- %windir%\System32\cmd.exe /c netsh firewall add portopening TCP 5985 "Port 5985"
- Win RM port open
-
-
- 14
- %windir%\System32\cmd.exe /c net stop winrm
- Stop Win RM Service
-
-
- 15
- %windir%\System32\cmd.exe /c sc config winrm start= auto
- Win RM Autostart
-
-
- 16
- %windir%\System32\cmd.exe /c net start winrm
- Start Win RM Service
-
-
- 17
- %windir%\System32\cmd.exe /c wmic useraccount where "name='vagrant'" set PasswordExpires=FALSE
- Disable password expiration for vagrant user
-
-
-
-
- true
-
-
-
-
- true
-
-
-
- false
- false
-
-
- true
-
-
- 1
-
-
- false
-
-
-
-
- true
- Windows Remote Management
- all
-
-
- true
- Remote Administration
- all
-
-
-
-
- 0
-
-
- true
-
-
-
-
- false
-
-
-
diff --git a/packer_templates/win_answer_files/2019/hyperv-gen2/Autounattend 2.xml b/packer_templates/win_answer_files/2019/hyperv-gen2/Autounattend 2.xml
deleted file mode 100644
index 58f6821a7..000000000
--- a/packer_templates/win_answer_files/2019/hyperv-gen2/Autounattend 2.xml
+++ /dev/null
@@ -1,332 +0,0 @@
-
-
-
-
-
-
-
- F:\viostor\2k19\amd64
-
-
- F:\NetKVM\2k19\amd64
-
-
- F:\Balloon\2k19\amd64
-
-
- F:\pvpanic\2k19\amd64
-
-
- F:\qemupciserial\2k19\amd64
-
-
- F:\qxldod\2k19\amd64
-
-
- F:\vioinput\2k19\amd64
-
-
- F:\viorng\2k19\amd64
-
-
- F:\vioscsi\2k19\amd64
-
-
- F:\vioserial\2k19\amd64
-
-
-
-
-
- en-US
-
- en-US
- en-US
- en-US
- en-US
- en-US
-
-
-
-
-
-
- 1
- 350
- Primary
-
-
- 2
- 100
- EFI
-
-
- 3
- 128
- MSR
-
-
- 4
- true
- Primary
-
-
-
-
- 1
- 1
-
- NTFS
- de94bba4-06d1-4d40-a16a-bfd50179d6ac
-
-
- 2
- 2
-
- FAT32
-
-
- 3
- 3
-
-
- 4
- 4
-
- NTFS
-
-
- 0
- true
-
- OnError
-
-
-
-
-
- /IMAGE/NAME
- Windows Server 2019 SERVERSTANDARD
-
-
-
- 0
- 4
-
-
-
-
-
- OnError
-
- true
- Vagrant
- Bento by Chef Software, Inc.
-
-
- false
-
-
-
-
-
- 1
-
-
- false
- false
-
-
-
-
- en-US
- en-US
- en-US
- en-US
-
-
-
- true
- true
- true
- true
- true
- Work
- 3
- true
- true
-
- true
- true
- true
-
-
- UTC
-
-
- vagrant
- true
-
-
-
-
- vagrant
- true
-
- Vagrant User
- vagrant
- administrators
- vagrant
-
-
-
-
-
- vagrant
- true
-
- vagrant
- true
-
-
-
- %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
- Set Execution Policy 64 Bit
- 1
-
-
- %windir%\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
- Set Execution Policy 32 Bit
- 2
-
-
- 3
- %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory "Private"
- Sets detected network connections to private to allow start of winrm
-
-
- 4
- %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP" -RemoteAddress Any
- Allows winrm over public profile interfaces
-
-
- 5
- %windir%\System32\cmd.exe /c winrm quickconfig -q
- winrm quickconfig -q
-
-
- 6
- %windir%\System32\cmd.exe /c winrm quickconfig -transport:http
- winrm quickconfig -transport:http
-
-
- 7
- %windir%\System32\cmd.exe /c winrm set winrm/config @{MaxTimeoutms="1800000"}
- Win RM MaxTimoutms
-
-
- 8
- %windir%\System32\cmd.exe /c winrm set winrm/config/winrs @{MaxMemoryPerShellMB="2048"}
- Win RM MaxMemoryPerShellMB
-
-
- 9
- %windir%\System32\cmd.exe /c winrm set winrm/config/service @{AllowUnencrypted="true"}
- Win RM AllowUnencrypted
-
-
- 10
- %windir%\System32\cmd.exe /c winrm set winrm/config/service/auth @{Basic="true"}
- Win RM auth Basic
-
-
- 11
- %windir%\System32\cmd.exe /c winrm set winrm/config/client/auth @{Basic="true"}
- Win RM client auth Basic
-
-
- 12
- %windir%\System32\cmd.exe /c winrm set winrm/config/listener?Address=*+Transport=HTTP @{Port="5985"}
- Win RM listener Address/Port
-
-
- 13
- %windir%\System32\cmd.exe /c netsh firewall add portopening TCP 5985 "Port 5985"
- Win RM port open
-
-
- 14
- %windir%\System32\cmd.exe /c net stop winrm
- Stop Win RM Service
-
-
- 15
- %windir%\System32\cmd.exe /c sc config winrm start= auto
- Win RM Autostart
-
-
- 16
- %windir%\System32\cmd.exe /c net start winrm
- Start Win RM Service
-
-
- 17
- %windir%\System32\cmd.exe /c wmic useraccount where "name='vagrant'" set PasswordExpires=FALSE
- Disable password expiration for vagrant user
-
-
-
-
- true
-
-
-
-
- true
-
-
-
- false
- false
-
-
- true
-
-
- 1
-
-
- false
-
-
-
-
- true
- Windows Remote Management
- all
-
-
- true
- Remote Administration
- all
-
-
-
-
- 0
-
-
- true
-
-
-
-
- false
-
-
-
diff --git a/packer_templates/win_answer_files/2022/hyperv-gen2/Autounattend 2.xml b/packer_templates/win_answer_files/2022/hyperv-gen2/Autounattend 2.xml
deleted file mode 100644
index ecfca3ebe..000000000
--- a/packer_templates/win_answer_files/2022/hyperv-gen2/Autounattend 2.xml
+++ /dev/null
@@ -1,332 +0,0 @@
-
-
-
-
-
-
-
- F:\viostor\2k22\amd64
-
-
- F:\NetKVM\2k22\amd64
-
-
- F:\Balloon\2k22\amd64
-
-
- F:\pvpanic\2k22\amd64
-
-
- F:\qemupciserial\2k22\amd64
-
-
- F:\qxldod\2k22\amd64
-
-
- F:\vioinput\2k22\amd64
-
-
- F:\viorng\2k22\amd64
-
-
- F:\vioscsi\2k22\amd64
-
-
- F:\vioserial\2k22\amd64
-
-
-
-
-
- en-US
-
- en-US
- en-US
- en-US
- en-US
- en-US
-
-
-
-
-
-
- 1
- 350
- Primary
-
-
- 2
- 100
- EFI
-
-
- 3
- 128
- MSR
-
-
- 4
- true
- Primary
-
-
-
-
- 1
- 1
-
- NTFS
- de94bba4-06d1-4d40-a16a-bfd50179d6ac
-
-
- 2
- 2
-
- FAT32
-
-
- 3
- 3
-
-
- 4
- 4
-
- NTFS
-
-
- 0
- true
-
- OnError
-
-
-
-
-
- /IMAGE/NAME
- Windows Server 2022 SERVERSTANDARD
-
-
-
- 0
- 4
-
-
-
-
-
- OnError
-
- true
- Vagrant
- Bento by Chef Software, Inc.
-
-
- false
-
-
-
-
-
- 1
-
-
- false
- false
-
-
-
-
- en-US
- en-US
- en-US
- en-US
-
-
-
- true
- true
- true
- true
- true
- Work
- 3
- true
- true
-
- true
- true
- true
-
-
- UTC
-
-
- vagrant
- true
-
-
-
-
- vagrant
- true
-
- Vagrant User
- vagrant
- administrators
- vagrant
-
-
-
-
-
- vagrant
- true
-
- vagrant
- true
-
-
-
- %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
- Set Execution Policy 64 Bit
- 1
-
-
- %windir%\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
- Set Execution Policy 32 Bit
- 2
-
-
- 3
- %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory "Private"
- Sets detected network connections to private to allow start of winrm
-
-
- 4
- %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -Command Set-NetFirewallRule -Name "WINRM-HTTP-In-TCP" -RemoteAddress Any
- Allows winrm over public profile interfaces
-
-
- 5
- %windir%\System32\cmd.exe /c winrm quickconfig -q
- winrm quickconfig -q
-
-
- 6
- %windir%\System32\cmd.exe /c winrm quickconfig -transport:http
- winrm quickconfig -transport:http
-
-
- 7
- %windir%\System32\cmd.exe /c winrm set winrm/config @{MaxTimeoutms="1800000"}
- Win RM MaxTimoutms
-
-
- 8
- %windir%\System32\cmd.exe /c winrm set winrm/config/winrs @{MaxMemoryPerShellMB="2048"}
- Win RM MaxMemoryPerShellMB
-
-
- 9
- %windir%\System32\cmd.exe /c winrm set winrm/config/service @{AllowUnencrypted="true"}
- Win RM AllowUnencrypted
-
-
- 10
- %windir%\System32\cmd.exe /c winrm set winrm/config/service/auth @{Basic="true"}
- Win RM auth Basic
-
-
- 11
- %windir%\System32\cmd.exe /c winrm set winrm/config/client/auth @{Basic="true"}
- Win RM client auth Basic
-
-
- 12
- %windir%\System32\cmd.exe /c winrm set winrm/config/listener?Address=*+Transport=HTTP @{Port="5985"}
- Win RM listener Address/Port
-
-
- 13
- %windir%\System32\cmd.exe /c netsh firewall add portopening TCP 5985 "Port 5985"
- Win RM port open
-
-
- 14
- %windir%\System32\cmd.exe /c net stop winrm
- Stop Win RM Service
-
-
- 15
- %windir%\System32\cmd.exe /c sc config winrm start= auto
- Win RM Autostart
-
-
- 16
- %windir%\System32\cmd.exe /c net start winrm
- Start Win RM Service
-
-
- 17
- %windir%\System32\cmd.exe /c wmic useraccount where "name='vagrant'" set PasswordExpires=FALSE
- Disable password expiration for vagrant user
-
-
-
-
- true
-
-
-
-
- true
-
-
-
- false
- false
-
-
- true
-
-
- 1
-
-
- false
-
-
-
-
- true
- Windows Remote Management
- all
-
-
- true
- Remote Administration
- all
-
-
-
-
- 0
-
-
- true
-
-
-
-
- false
-
-
-