Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Admin-Loader
- If (-NOT([Security.Principal.WindowsPrincipal]`
- [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
- [Security.Principal.WindowsBuiltInRole] “Administrator”))
- {
- $Args = ("'" + $PSCommandPath + "'")
- Start-Process Powershell -Verb runAs -ArgumentList "& $Args"
- Break
- }
- #Script-Start
- #Configuring Firewall
- #Defining Subnets
- $LocalSubnet = "192.168.0.0/255.255.255.0"
- #Enabling Windows Firewall
- Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True
- #Setting Inbound/outbound policy
- Set-NetFirewallProfile -All `
- -AllowInboundRules True `
- -DefaultInboundAction Block `
- -DefaultOutboundAction Allow `
- -LogAllowed False `
- -LogIgnored False `
- -LogBlocked False `
- -NotifyOnListen False
- #Clearing Firewall Rules
- Remove-NetFirewallRule -All
- #Defining Rules
- #File and Printer Sharing
- New-NetFirewallRule -Name 'FPS-LLMNR-In-UDP' `
- -DisplayName 'File and Printer Sharing (LLMNR-UDP-In)' `
- -Description 'Inbound rule for File and Printer Sharing to allow Link Local Multicast Name Resolution. [UDP 5355]' `
- -Group '@FirewallAPI.dll,-28502' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'dnscache' `
- -Program '%SystemRoot%\system32\svchost.exe' `
- -Protocol 'UDP' `
- -LocalPort '5355' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'FPS-ICMP4-ERQ-In' `
- -DisplayName 'File and Printer Sharing (Echo Request - ICMPv4-In)' `
- -Description 'Echo Request messages are sent as ping requests to other nodes.' `
- -Group '@FirewallAPI.dll,-28502' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'Any' `
- -Program 'Any' `
- -Protocol 'ICMPv4' `
- -LocalPort 'RPC' `
- -RemotePort 'Any' `
- -IcmpType '8' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'FPS-ICMP6-ERQ-In' `
- -DisplayName 'File and Printer Sharing (Echo Request - ICMPv6-In)' `
- -Description 'Echo Request messages are sent as ping requests to other nodes.' `
- -Group '@FirewallAPI.dll,-28502' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'Any' `
- -Program 'Any' `
- -Protocol 'ICMPv6' `
- -LocalPort 'RPC' `
- -RemotePort 'Any' `
- -IcmpType '128' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'FPS-NB_Datagram-In-UDP' `
- -DisplayName 'File and Printer Sharing (NB-Datagram-In)' `
- -Description 'Inbound rule for File and Printer Sharing to allow NetBIOS Datagram transmission and reception. [UDP 138]' `
- -Group '@FirewallAPI.dll,-28502' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'Any' `
- -Program 'System' `
- -Protocol 'UDP' `
- -LocalPort '138' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'FPS-NB_Name-In-UDP' `
- -DisplayName 'File and Printer Sharing (NB-Name-In)' `
- -Description 'Inbound rule for File and Printer Sharing to allow NetBIOS Name Resolution. [UDP 137]' `
- -Group '@FirewallAPI.dll,-28502' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'Any' `
- -Program 'System' `
- -Protocol 'UDP' `
- -LocalPort '137' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'FPS-NB_Session-In-TCP' `
- -DisplayName 'File and Printer Sharing (NB-Session-In)' `
- -Description 'Inbound rule for File and Printer Sharing to allow NetBIOS Session Service connections. [TCP 139]' `
- -Group '@FirewallAPI.dll,-28502' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'Any' `
- -Program 'System' `
- -Protocol 'TCP' `
- -LocalPort '139' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'FPS-SMB-In-TCP' `
- -DisplayName 'File and Printer Sharing (SMB-In)' `
- -Description 'Inbound rule for File and Printer Sharing to allow Server Message Block transmission and reception via Named Pipes. [TCP 445]' `
- -Group '@FirewallAPI.dll,-28502' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'Any' `
- -Program 'System' `
- -Protocol 'TCP' `
- -LocalPort '445' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'FPS-SpoolSvc-In-TCP' `
- -DisplayName 'File and Printer Sharing (Spooler Service - RPC)' `
- -Description 'Inbound rule for File and Printer Sharing to allow the Print Spooler Service to communicate via TCP/RPC.' `
- -Group '@FirewallAPI.dll,-28502' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'Spooler' `
- -Program '%SystemRoot%\system32\spoolsv.exe' `
- -Protocol 'TCP' `
- -LocalPort 'RPC' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'FPS-RPCSS-In-TCP' `
- -DisplayName 'File and Printer Sharing (Spooler Service - RPC-EPMAP)' `
- -Description 'Inbound rule for the RPCSS service to allow RPC/TCP traffic for the Spooler Service.' `
- -Group '@FirewallAPI.dll,-28502' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'Rpcss' `
- -Program 'Any' `
- -Protocol 'TCP' `
- -LocalPort 'RPCEPMap' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'FPSSMBD-iWARP-In-TCP' `
- -DisplayName 'File and Printer Sharing over SMBDirect (iWARP-In)' `
- -Description 'Inbound rule for File and Printer Sharing over SMBDirect to allow iWARP [TCP 5445]' `
- -Group '@FirewallAPI.dll,-28502' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'Any' `
- -Program 'System' `
- -Protocol 'TCP' `
- -LocalPort '5445' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- #Netowork Discovery
- New-NetFirewallRule -Name 'NETDIS-LLMNR-In-UDP-Active' `
- -DisplayName 'Network Discovery (LLMNR-UDP-In)' `
- -Description 'Inbound rule for Network Discovery to allow Link Local Multicast Name Resolution. [UDP 5355]' `
- -Group '@FirewallAPI.dll,-32752' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'dnscache' `
- -Program '%SystemRoot%\system32\svchost.exe' `
- -Protocol 'UDP' `
- -LocalPort '5355' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'NETDIS-NB_Datagram-In-UDP-Active' `
- -DisplayName 'Network Discovery (NB-Datagram-In)' `
- -Description 'Inbound rule for Network Discovery to allow NetBIOS Datagram transmission and reception. [UDP 138]' `
- -Group '@FirewallAPI.dll,-32752' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'Any' `
- -Program 'System' `
- -Protocol 'UDP' `
- -LocalPort '138' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'NETDIS-NB_Name-In-UDP-Active' `
- -DisplayName 'Network Discovery (NB-Name-In)' `
- -Description 'Inbound rule for Network Discovery to allow NetBIOS Name Resolution. [UDP 137]' `
- -Group '@FirewallAPI.dll,-32752' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'Any' `
- -Program 'System' `
- -Protocol 'UDP' `
- -LocalPort '137' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'NETDIS-FDRESPUB-WSD-In-UDP-Active' `
- -DisplayName 'Network Discovery (Pub-WSD-In)' `
- -Description 'Inbound rule for Network Discovery to discover devices via Function Discovery. [UDP 3702]' `
- -Group '@FirewallAPI.dll,-32752' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'fdrespub' `
- -Program '%SystemRoot%\system32\svchost.exe' `
- -Protocol 'UDP' `
- -LocalPort '3702' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'NETDIS-SSDPSrv-In-UDP-Activee' `
- -DisplayName 'Network Discovery (SSDP-In)' `
- -Description 'Inbound rule for Network Discovery to allow use of the Simple Service Discovery Protocol. [UDP 1900]' `
- -Group '@FirewallAPI.dll,-32752' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'Ssdpsrv' `
- -Program '%SystemRoot%\system32\svchost.exe' `
- -Protocol 'UDP' `
- -LocalPort '1900' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'NETDIS-UPnPHost-In-TCP-Active' `
- -DisplayName 'Network Discovery (UPnP-In)' `
- -Description 'Inbound rule for Network Discovery to allow use of Universal Plug and Play. [TCP 2869]' `
- -Group '@FirewallAPI.dll,-32752' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'Any' `
- -Program 'System' `
- -Protocol 'TCP' `
- -LocalPort '2869' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'NETDIS-WSDEVNT-In-TCP-Active' `
- -DisplayName 'Network Discovery (WSD Events-In)' `
- -Description 'Inbound rule for Network Discovery to allow WSDAPI Events via Function Discovery. [TCP 5357]' `
- -Group '@FirewallAPI.dll,-32752' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'Any' `
- -Program 'System' `
- -Protocol 'TCP' `
- -LocalPort '5357' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'NETDIS-WSDEVNTS-In-TCP-Active' `
- -DisplayName 'Network Discovery (WSD EventsSecure-In)' `
- -Description 'Inbound rule for Network Discovery to allow Secure WSDAPI Events via Function Discovery. [TCP 5358]' `
- -Group '@FirewallAPI.dll,-32752' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'Any' `
- -Program 'System' `
- -Protocol 'TCP' `
- -LocalPort '5358' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'NETDIS-FDPHOST-In-UDP-Active' `
- -DisplayName 'Network Discovery (WSD-In)' `
- -Description 'Inbound rule for Network Discovery to discover devices via Function Discovery. [UDP 3702]' `
- -Group '@FirewallAPI.dll,-32752' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'fdphost' `
- -Program '%SystemRoot%\system32\svchost.exe' `
- -Protocol 'UDP' `
- -LocalPort '3702' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'NETDIS-DAS-In-UDP-Activee' `
- -DisplayName 'Network Discovery (WSD-In)' `
- -Description 'Inbound rule for Network Discovery to discover devices via Device Association Framework. [UDP 3702]' `
- -Group '@FirewallAPI.dll,-32752' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'Any' `
- -Program '%SystemRoot%\system32\dashost.exe' `
- -Protocol 'UDP' `
- -LocalPort '3702' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- #Remote Desktop
- New-NetFirewallRule -Name 'RemoteDesktop-UserMode-In-TCP' `
- -DisplayName 'Remote Desktop - User Mode (TCP-In)' `
- -Description 'Inbound rule for the Remote Desktop service to allow RDP traffic. [TCP 3389]' `
- -Group '@FirewallAPI.dll,-28752' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'termservice' `
- -Program '%SystemRoot%\system32\svchost.exe' `
- -Protocol 'TCP' `
- -LocalPort '3389' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- New-NetFirewallRule -Name 'RemoteDesktop-UserMode-In-UDP' `
- -DisplayName 'Remote Desktop - User Mode (UDP-In)' `
- -Description 'Inbound rule for the Remote Desktop service to allow RDP traffic. [UDP 3389]' `
- -Group '@FirewallAPI.dll,-28752' `
- -Enabled 'True' `
- -Profile 'Private' `
- -Direction 'Inbound' `
- -Action 'Allow' `
- -LocalAddress $LocalSubnet `
- -RemoteAddress $LocalSubnet `
- -Service 'termservice' `
- -Program '%SystemRoot%\system32\svchost.exe' `
- -Protocol 'UDP' `
- -LocalPort '3389' `
- -RemotePort 'Any' `
- -IcmpType 'Any' `
- -DynamicTarget 'Any'
- #Nulling Variables
- $LocalSubnet = $null
- #Poweroptions
- powercfg -h off
- #Setting registry keys
- #Initialize an array
- $RegistryEntries = @()
- #Create a PSObject with the associated properties hashtable
- #Disabling Xbox Capture
- $RegTable = new-object PSObject -Property @{ Key = 'Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR';
- Name = 'AppCaptureEnabled';
- PropertyType = 'Dword';
- Value = '0'}
- $RegistryEntries += $regtable
- #Disabling Xbox Capture
- $RegTable = new-object PSObject -Property @{ Key = 'Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR';
- Name = 'AudioCaptureEnabled';
- PropertyType = 'Dword';
- Value = '0'}
- $RegistryEntries += $regtable
- #Disabling Xbox Capture
- $RegTable = new-object PSObject -Property @{ Key = 'Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR';
- Name = 'HistoricalCaptureEnabled';
- PropertyType = 'Dword';
- Value = '0'}
- $RegistryEntries += $regtable
- #Disabling Xbox Game Mode
- $RegTable = new-object PSObject -Property @{ Key = 'Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\GameBar';
- Name = 'AllowAutoGameMode';
- PropertyType = 'Dword';
- Value = '0'}
- $RegistryEntries += $regtable
- #Disabling Xbox GameDVR overlay
- $RegTable = new-object PSObject -Property @{ Key = 'Registry::HKEY_CURRENT_USER\SYSTEM\GameConfigStore';
- Name = 'GameDVR_Enabled';
- PropertyType = 'Dword';
- Value = '0'}
- $RegistryEntries += $regtable
- #Disabling Cortana
- $RegTable = new-object PSObject -Property @{ Key = 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search';
- Name = 'AllowCortana';
- PropertyType = 'Dword';
- Value = '0'}
- $RegistryEntries += $regtable
- #Disabling Cortana Lock Screen
- $RegTable = new-object PSObject -Property @{ Key = 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search';
- Name = 'AllowCortanaAboveLock';
- PropertyType = 'Dword';
- Value = '0'}
- $RegistryEntries += $regtable
- #Disabling Start Menu suggested content
- $RegTable = new-object PSObject -Property @{ Key = 'REGISTRY::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CloudContent';
- Name = 'DisableWindowsConsumerFeatures';
- PropertyType = 'Dword';
- Value = '1'}
- $RegistryEntries += $regtable
- #Setting Explorer LaunchTo
- $RegTable = new-object PSObject -Property @{ Key = 'REGISTRY::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced';
- Name = 'LaunchTo';
- PropertyType = 'Dword';
- Value = '1'}
- $RegistryEntries += $regtable
- #Setting Explorer ShowRecent
- $RegTable = new-object PSObject -Property @{ Key = 'REGISTRY::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer';
- Name = 'ShowRecent';
- PropertyType = 'Dword';
- Value = '0'}
- $RegistryEntries += $regtable
- #Setting Explorer ShowFrequent
- $RegTable = new-object PSObject -Property @{ Key = 'REGISTRY::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer';
- Name = 'ShowFrequent';
- PropertyType = 'Dword';
- Value = '0'}
- $RegistryEntries += $regtable
- #Setting Explorer HideFileExt
- $RegTable = new-object PSObject -Property @{ Key = 'REGISTRY::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced';
- Name = 'HideFileExt';
- PropertyType = 'Dword';
- Value = '0'}
- $RegistryEntries += $regtable
- #Setting Explorer Hidden
- $RegTable = new-object PSObject -Property @{ Key = 'REGISTRY::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced';
- Name = 'Hidden';
- PropertyType = 'Dword';
- Value = '1'}
- $RegistryEntries += $regtable
- #Setting Explorer HideDrivesWithNoMedia
- $RegTable = new-object PSObject -Property @{ Key = 'REGISTRY::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced';
- Name = 'HideDrivesWithNoMedia';
- PropertyType = 'Dword';
- Value = '0'}
- $RegistryEntries += $regtable
- #Setting Explorer Autoplay
- $RegTable = new-object PSObject -Property @{ Key = 'REGISTRY::HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers';
- Name = 'DisableAutoplay';
- PropertyType = 'Dword';
- Value = '1'}
- $RegistryEntries += $regtable
- #Invoking registry changes
- ForEach ($line in $RegistryEntries)
- {
- IF ((Test-Path -Path $line.key)-ne "True")
- {
- New-Item -Path $line.key | out-Null
- }
- New-ItemProperty -Force -Path $line.key -Name $line.name -Value $line.value -PropertyType $line.propertytype
- }
- #Nulling Variables
- $line = $null
- $RegistryEntries = $null
- $RegTable = $null
- #Configuring Services
- $StopServiceArray = @('HomeGroupListener';
- 'HomeGroupProvider')
- ForEach ($line in $StopServiceArray)
- {
- Stop-Service -Name $line
- Set-Service -Name $line -Status Stopped -StartupType Disabled
- }
- #Nulling Variables
- $line = $null
- $StopServiceArray = $null
- #uninstalling store apps
- $WindowsApps = @('Microsoft.3DBuilder',
- 'Microsoft.BingWeather',
- 'Microsoft.DesktopAppInstaller',
- 'Microsoft.GetHelp',
- 'Microsoft.Getstarted',
- 'Microsoft.Messaging',
- 'Microsoft.Microsoft3DViewer',
- 'Microsoft.MicrosoftOfficeHub',
- 'Microsoft.MicrosoftSolitaireCollection',
- 'Microsoft.Office.OneNote',
- 'Microsoft.OneConnect',
- 'Microsoft.People',
- 'Microsoft.Print3D',
- 'Microsoft.SkypeApp',
- 'Microsoft.WindowsAlarms',
- 'Microsoft.WindowsCamera',
- 'microsoft.windowscommunicationsapps',
- 'Microsoft.WindowsFeedbackHub',
- 'Microsoft.WindowsMaps',
- 'Microsoft.WindowsSoundRecorder',
- 'Microsoft.Xbox.TCUI',
- 'Microsoft.XboxApp',
- 'Microsoft.XboxGameOverlay',
- 'Microsoft.XboxIdentityProvider',
- 'Microsoft.XboxSpeechToTextOverlay',
- 'Microsoft.ZuneMusic',
- 'Microsoft.ZuneVideo',
- 'king.com.CandyCrushSodaSaga',
- 'Facebook.Facebook',
- 'Microsoft.BingNews',
- 'Microsoft.MinecraftUWP',
- 'A278AB0D.MarchofEmpires',
- '9E2F88E3.Twitter')
- foreach ($App in $WindowsApps)
- {
- Get-AppxPackage -Name $App | Remove-AppxPackage -ErrorAction SilentlyContinue | Out-Null
- Get-AppXProvisionedPackage -Online | Where-Object DisplayName -eq $App | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue | Out-Null
- }
- #Nulling Variables
- $WindowsApps = $null
- $App = $null
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement