@@ -1157,6 +1157,7 @@ Write-Host "logging to file: $LogFilePath" -ForegroundColor Cyan
1157
1157
[boolean ]$ApplyPrivacyMitigations = $false
1158
1158
[boolean ]$RemoveRebootOnLockScreen = $false
1159
1159
[boolean ]$RemoveUnusedPrinters = $false
1160
+ [boolean ]$RemoveVMToolsTrayIcon = $false
1160
1161
# System Adv Settings
1161
1162
[boolean ]$DisableSmartCardLogon = $false
1162
1163
[boolean ]$ForceStrictSmartCardLogon = $false
@@ -1246,6 +1247,8 @@ If(Get-SMSTSENV){
1246
1247
If ($tsenv: CFG_ApplyPrivacyMitigations ){[boolean ]$ApplyPrivacyMitigations = [boolean ]::Parse($tsenv.Value (" CFG_ApplyPrivacyMitigations" ))}
1247
1248
If ($tsenv: CFG_RemoveRebootOnLockScreen ){[boolean ]$RemoveRebootOnLockScreen = [boolean ]::Parse($tsenv.Value (" CFG_RemoveRebootOnLockScreen" ))}
1248
1249
If ($tsenv: CFG_RemoveUnusedPrinters ){[boolean ]$RemoveUnusedPrinters = [boolean ]::Parse($tsenv.Value (" CFG_RemoveUnusedPrinters" ))}
1250
+ If ($tsenv: CFG_RemoveVMToolsTrayIcon ){[boolean ]$RemoveVMToolsTrayIcon = [boolean ]::Parse($tsenv.Value (" CFG_RemoveVMToolsTrayIcon" ))}
1251
+
1249
1252
# System Adv Settings
1250
1253
If ($tsenv: CFG_DisableSmartCardLogon ){[boolean ]$DisableSmartCardLogon = [boolean ]::Parse($tsenv.Value (" CFG_DisableSmartCardLogon" ))}
1251
1254
If ($tsenv: CFG_ForceStrictSmartCardLogon ){[boolean ]$ForceStrictSmartCardLogon = [boolean ]::Parse($tsenv.Value (" CFG_ForceStrictSmartCardLogon" ))}
@@ -1400,7 +1403,7 @@ If($DisableWindowsUpgrades)
1400
1403
Set-SystemSetting - Path ' HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate' - Name ' DisableOSUpgrade' - Type DWord - Value 1 - Force | Out-Null
1401
1404
1402
1405
Write-LogEntry " Disabling access the Insider build controls in the Advanced Options"
1403
- Set-SystemSetting - Path ' HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection' - Name ' LimitEnhancedDiagnosticDataWindowsAnalytics' - Type DWord - Value 1 - Force | Out-Null
1406
+ Set-SystemSetting - Path ' HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection' - Name ' LimitEnhancedDiagnosticDataWindowsAnalytics' - Type DWord - Value 1 - Force - TryLGPO: $true
1404
1407
}
1405
1408
Else {$stepCounter ++ }
1406
1409
@@ -1705,6 +1708,7 @@ If($DisableAllNotifications)
1705
1708
" Windows.SystemToast.RasToastNotifier" = " VPN Notifications"
1706
1709
" Windows.SystemToast.HelloFace" = " Windows Hello Notifications"
1707
1710
" Windows.SystemToast.WiFiNetworkManager" = " Wireless Notifications"
1711
+
1708
1712
}
1709
1713
Show-ProgressStatus - Message " Disabling Toast Notifications" - Step ($stepCounter ++ ) - MaxStep $script :Maxsteps
1710
1714
$i = 1
@@ -2764,7 +2768,6 @@ If ($OptimizeForVDI)
2764
2768
{
2765
2769
Show-ProgressStatus - Message " Configuring VDI Optimizations" - Step ($stepCounter ++ ) - MaxStep $script :Maxsteps
2766
2770
2767
-
2768
2771
Write-LogEntry " VDI Optimizations :: Hiding network options from Lock Screen"
2769
2772
Set-SystemSetting - Path ' HKLM:\SOFTWARE\Policies\Microsoft\Windows\System' - Name ' DontDisplayNetworkSelectionUI' - Type DWord - Value 1 - Force - TryLGPO:$true
2770
2773
@@ -2777,7 +2780,7 @@ If ($OptimizeForVDI)
2777
2780
Write-LogEntry " VDI Optimizations [OSOT ID:30] :: Disabling Background Layout Service"
2778
2781
Set-SystemSetting - Path ' HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\OptimalLayout' - Name ' EnableAutoLayout' - Type DWord - Value 0 - Force
2779
2782
2780
- Write-LogEntry " VDI Optimizations [OSOT ID:31] :: Disabling CIFS Change Notifications"
2783
+ Write-LogEntry " VDI Optimizations [OSOT ID:31] :: Disabling CIfS Change Notifications"
2781
2784
Set-SystemSetting - Path ' HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer' - Name ' NoRemoteRecursiveEvents' - Type DWord - Value 0 - Force
2782
2785
2783
2786
Write-LogEntry (" VDI Optimizations :: Disabling Storage Sense" )
@@ -2825,31 +2828,31 @@ If ($OptimizeForVDI)
2825
2828
Write-LogEntry " VDI Optimizations [OSOT ID:287] :: Disabling Boot Optimize Function"
2826
2829
Set-SystemSetting - Path ' HKLM:\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction' - Name ' Enable' - Type String - Value ' 0' - Force
2827
2830
2828
- Write-LogEntry " VDI Optimizations :: Disable Superfetch"
2831
+ Write-LogEntry " VDI Optimizations :: Disabling Superfetch"
2829
2832
Set-SystemSetting - Path ' HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters' - Name ' EnableSuperfetch' - Type DWord - Value 0 - Force
2830
2833
2831
2834
Write-LogEntry " VDI Optimizations :: Disabling Paging Executive"
2832
2835
Set-SystemSetting - Path ' HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' - Name ' DisablePagingExecutive' - Value 1 - Force
2833
2836
2834
- Write-LogEntry " VDI Optimizations :: Disable Storing Recycle Bin Files"
2837
+ Write-LogEntry " VDI Optimizations :: Disabling Storing Recycle Bin Files"
2835
2838
Set-SystemSetting - Path ' HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer' - Name ' NoRecycleFiles' - Type DWord - Value 1 - Force
2836
2839
2837
- Write-LogEntry " VDI Optimizations :: Disk Timeout Value"
2840
+ Write-LogEntry " VDI Optimizations :: Reducing Disk Timeout Value"
2838
2841
Set-SystemSetting - Path ' HKLM:\SYSTEM\CurrentControlSet\services\Disk' - Name ' TimeOutValue' - Type DWord - Value 200 - Force
2839
2842
2840
- Write-LogEntry " VDI Optimizations :: Application Event Log Max Size"
2843
+ Write-LogEntry " VDI Optimizations :: Reducing Application Event Log Max Size"
2841
2844
Set-SystemSetting - Path ' HKLM:\SYSTEM\CurrentControlSet\services\eventlog\Application' - Name ' MaxSize' - Type DWord - Value 100000 - Force
2842
2845
2843
- Write-LogEntry " VDI Optimizations :: Application Event Log Retention"
2846
+ Write-LogEntry " VDI Optimizations :: Disabling Application Event Log Retention"
2844
2847
Set-SystemSetting - Path ' HKLM:\SYSTEM\CurrentControlSet\services\eventlog\Application' - Name ' Retention' - Type DWord - Value 0 - Force
2845
2848
2846
- Write-LogEntry " VDI Optimizations :: System Event Log Max Size"
2849
+ Write-LogEntry " VDI Optimizations :: Reducing System Event Log Max Size"
2847
2850
Set-SystemSetting - Path ' HKLM:\SYSTEM\CurrentControlSet\services\eventlog\System' - Name ' MaxSize' - Type DWord - Value 100000 - Force
2848
2851
2849
- Write-LogEntry " VDI Optimizations :: System Event Log Retention"
2852
+ Write-LogEntry " VDI Optimizations :: Disabling System Event Log Retention"
2850
2853
Set-SystemSetting - Path ' HKLM:\SYSTEM\CurrentControlSet\services\eventlog\System' - Name ' Retention' - Type DWord - Value 0 - Force
2851
2854
2852
- Write-LogEntry " VDI Optimizations :: Security Event Log Max Size"
2855
+ Write-LogEntry " VDI Optimizations :: Reducing Security Event Log Max Size"
2853
2856
Set-SystemSetting - Path ' HKLM:\SYSTEM\CurrentControlSet\services\eventlog\Security' - Name ' MaxSize' - Type DWord - Value 100000 - Force
2854
2857
2855
2858
Write-LogEntry " VDI Optimizations :: Disabling Security Event Log Retention"
@@ -2889,26 +2892,30 @@ If ($OptimizeForVDI)
2889
2892
Set-SystemSetting -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\WMI\Autologger\UBPM' -Name Start -Type DWord -Value 0 -Force
2890
2893
Set-SystemSetting -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\WMI\Autologger\WiFiDriverIHVSession' -Name Start -Type DWord -Value 0 -Force
2891
2894
Set-SystemSetting -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\WMI\Autologger\WiFiSession' -Name Start -Type DWord -Value 0 -Force
2892
- #>
2893
2895
2894
-
2896
+ #>
2895
2897
2896
2898
Write-LogEntry " VDI Optimizations :: Disabling TLS 1.0"
2897
2899
Set-SystemSetting - Path ' HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client' - Name ' Enabled' - Type DWORD - Value ' 0' - Force
2898
2900
Set-SystemSetting - Path ' HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client' - Name ' DisabledByDefault' - Type DWORD - Value ' 1' - Force
2899
2901
Set-SystemSetting - Path ' HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server' - Name ' Enabled' - Type DWORD - Value ' 0' - Force
2900
2902
Set-SystemSetting - Path ' HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server' - Name ' DisabledByDefault' - Type DWORD - Value ' 1' - Force
2901
2903
2902
-
2903
2904
Set-UserSetting - Message " VDI Optimizations :: Change Explorer Default View" - Path ' SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' - Name ' LaunchTo' - Type DWord - Value 1 - Force
2904
- Set-UserSetting - Message " VDI Optimizations :: Settings Temporary Internet Files to Non Persistent" - Path ' SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache' - Name ' Persistent' - Type DWord - Value 0 - Force
2905
2905
Set-UserSetting - Message " VDI Optimizations [OSOT 11] :: Disable RSS Feeds" - Path ' SOFTWARE\Microsoft\Feeds' - Name ' SyncStatus' - Type DWord - Value 0 - Force
2906
2906
Set-UserSetting - Message " VDI Optimizations [OSOT ID:8] :: Disabling show most used apps at start menu" - Path ' SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' - Name ' Start_TrackProgs' - Type DWord - Value 0 - Force
2907
2907
Set-UserSetting - Message " VDI Optimizations [OSOT ID:9] :: Disabling show recent items at start menu" - Path ' SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' - Name ' Start_TrackDocs' - Type DWord - Value 0 - Force
2908
2908
Set-UserSetting - Message " VDI Optimizations [OSOT ID:30] :: Disabling Toast notifications to the lock screen" - Path ' SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications' - Name ' NoToastApplicationNotificationOnLockScreen' - Type DWord - Value ' 1' - Force
2909
2909
Set-UserSetting - Message " VDI Optimizations [VDIGUYS] :: Remove People Button From the Task Bar in Windows" - Path ' SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People' - Name ' PeopleBand' - Type DWord - Value 0 - Force
2910
-
2911
-
2910
+ Set-UserSetting - Message " VDI Optimizations :: Settings Temporary Internet Files to Non Persistent" - Path ' SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache' - Name ' Persistent' - Type DWord - Value 0 - Force
2911
+
2912
+ Write-LogEntry " VDI Optimizations :: Reduce IE Temp File."
2913
+ Set-SystemSetting - Path ' HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Paths' - Name Paths - Type DWord - Value 0x4 - Force
2914
+ Set-SystemSetting - Path ' HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Paths\path1' - Name CacheLimit - Type DWord - Value 0x100 - Force
2915
+ Set-SystemSetting - Path ' HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Paths\path2' - Name CacheLimit - Type DWord - Value 0x100 - Force
2916
+ Set-SystemSetting - Path ' HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Paths\path3' - Name CacheLimit - Type DWord - Value 0x100 - Force
2917
+ Set-SystemSetting - Path ' HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Paths\path4' - Name CacheLimit - Type DWord - Value 0x100 - Force
2918
+
2912
2919
Set-UserSetting - Message " VDI Optimizations :: Disabling Storage Sense [01]" - Path ' SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy' - Name 01 - Type DWord - Value 0 - Force
2913
2920
Set-UserSetting - Message " VDI Optimizations :: Disabling Storage Sense [02]" - Path ' SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy' - Name 02 - Type DWord - Value 0 - Force
2914
2921
Set-UserSetting - Message " VDI Optimizations :: Disabling Storage Sense [04]" - Path ' SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy' - Name 04 - Type DWord - Value 0 - Force
@@ -2923,7 +2930,7 @@ If ($OptimizeForVDI)
2923
2930
Else {$stepCounter ++ }
2924
2931
2925
2932
2926
- IF ($OptimizeNetwork ){
2933
+ If ($OptimizeNetwork ){
2927
2934
2928
2935
Write-LogEntry " VDI Optimizations :: Configuring SMB Modifications for performance"
2929
2936
Set-SystemSetting - Path ' HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters' - Name ' DisableBandwidthThrottling' - Type " DWORD" - Value " 1" - Force
@@ -3140,6 +3147,14 @@ If($ShowHiddenFiles)
3140
3147
Else {$stepCounter ++ }
3141
3148
3142
3149
3150
+ If ($RemoveVMToolsTrayIcon ){
3151
+ if ( Test-Path " $Env: Programfiles \VMware\VMware Tools" ){
3152
+ Write-LogEntry (" Removing VM Tools Tray icon from taskbar..." ) - Severity 1 - Outhost
3153
+ Set-SystemSetting - Path ' HKLM:\SOFTWARE\VMware, Inc.\VMware Tools' - Name ' ShowTray' - Type DWord - Value 0 - Force
3154
+ }
3155
+ }
3156
+ Else {$stepCounter ++ }
3157
+
3143
3158
If ($ShowThisPCOnDesktop )
3144
3159
{
3145
3160
Show-ProgressStatus - Message " Adding 'This PC' desktop shortcut" - Step ($stepCounter ++ ) - MaxStep $script :Maxsteps
0 commit comments