(#84) Add option to remove PowerShell ISE

- Like other options, you can also enable if you want
main
Plínio Larrubia 2 years ago committed by Plínio Larrubia
parent ed671ff15c
commit 38fd2f8d82
No known key found for this signature in database
GPG Key ID: 057B0A87CB137C69

@ -204,7 +204,10 @@ function Show-GUI() {
$CbPrintingXPSServices = New-CheckBox -Text "Printing-XPSServices-Features" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.CheckBoxHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $CbPrintToPDFServices
$CbWindowsMediaPlayer = New-CheckBox -Text "Windows Media Player" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.CheckBoxHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $CbPrintingXPSServices
$ClMiscFeatures = New-Label -Text "Miscellaneous Features" -Width $LayoutT1.PanelWidth -Height $LayoutT1.CaptionLabelHeight -LocationX 0 -FontSize $LayoutT1.Heading[2] -FontStyle 'Bold' -ElementBefore $CbWindowsMediaPlayer
$ClWindowsCapabilities = New-Label -Text "Windows Capabilities" -Width $LayoutT1.PanelWidth -Height $LayoutT1.CaptionLabelHeight -LocationX 0 -FontSize $LayoutT1.Heading[2] -FontStyle 'Bold' -ElementBefore $CbWindowsMediaPlayer
$CbPowerShellISE = New-CheckBox -Text "PowerShell ISE" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.CheckBoxHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $ClWindowsCapabilities
$ClMiscFeatures = New-Label -Text "Miscellaneous Features" -Width $LayoutT1.PanelWidth -Height $LayoutT1.CaptionLabelHeight -LocationX 0 -FontSize $LayoutT1.Heading[2] -FontStyle 'Bold' -ElementBefore $CbPowerShellISE
$CbEncryptedDNS = New-CheckBox -Text "Enable Encrypted DNS" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.CheckBoxHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $ClMiscFeatures
$CbGodMode = New-CheckBox -Text "Enable God Mode" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.CheckBoxHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $CbEncryptedDNS
$CbMouseNaturalScroll = New-CheckBox -Text "Enable Mouse Natural Scroll" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.CheckBoxHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $CbGodMode
@ -430,6 +433,7 @@ function Show-GUI() {
$T1Panel2.Controls.AddRange(@($ClOtherTools, $RandomizeSystemColor, $ReinstallBloatApps, $RepairWindows, $ShowDebloatInfo))
$T1Panel3.Controls.AddRange(@($ClWindowsUpdate, $CbAutomaticWindowsUpdate))
$T1Panel3.Controls.AddRange(@($ClOptionalFeatures, $CbInternetExplorer, $CbPrintToPDFServices, $CbPrintingXPSServices, $CbWindowsMediaPlayer))
$T1Panel3.Controls.AddRange(@($ClWindowsCapabilities, $CbPowerShellISE))
$T1Panel3.Controls.AddRange(@($ClMiscFeatures, $CbEncryptedDNS, $CbGodMode, $CbMouseNaturalScroll, $CbTakeOwnership, $CbFastShutdownPCShortcut))
$T2Panel1.Controls.AddRange(@($UpgradeAll))
@ -752,6 +756,16 @@ function Show-GUI() {
}
})
$CbPowerShellISE.Add_Click( {
If ($CbPowerShellISE.CheckState -eq "Checked") {
Enable-PowerShellISE
$CbPowerShellISE.Text = "[ON] PowerShell ISE *"
} Else {
Disable-PowerShellISE
$CbPowerShellISE.Text = "[OFF] PowerShell ISE"
}
})
$CbEncryptedDNS.Add_Click( {
If ($CbEncryptedDNS.CheckState -eq "Checked") {
Enable-EncryptedDNS

@ -6,6 +6,7 @@ Import-Module -DisableNameChecking $PSScriptRoot\..\lib\debloat-helper\"remove-i
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\debloat-helper\"service-startup-handler.psm1"
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\debloat-helper\"set-item-property-verified.psm1"
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\debloat-helper\"uwp-appx-handler.psm1"
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\debloat-helper\"windows-capability-handler.psm1"
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\debloat-helper\"windows-feature-handler.psm1"
$DesktopPath = [Environment]::GetFolderPath("Desktop");
@ -256,6 +257,14 @@ function Enable-PhoneLink() {
Set-ItemPropertyVerified -Path "$PathToLMPoliciesSystem" -Name "EnableMmx" -Type DWord -Value 1
}
function Disable-PowerShellISE() {
Set-CapabilityState -State Disabled -Capabilities @("Microsoft.Windows.PowerShell.ISE*")
}
function Enable-PowerShellISE() {
Set-CapabilityState -State Enabled -Capabilities @("Microsoft.Windows.PowerShell.ISE*")
}
function Disable-PrintToPDFServicesToogle() {
Set-OptionalFeatureState -State 'Disabled' -OptionalFeatures @("Printing-PrintToPDFServices-Features")
}

Loading…
Cancel
Save