Loading Firewall/set_ping_Rules.ps1 +47 −2 Original line number Diff line number Diff line # enable pings from other institute clients $inst_networks = "131.188.220.192/26,192.168.220.128/25,10.188.220.0/25" # Networks $network131 = "131.188.220.192/26" $network192 = "192.168.220.128/25" $network10 = "10.188.220.0/25" $management_nodes = "131.188.220.208/29","192.168.220.230-192.168.220.230.231","192.168.220.215","10.188.220.96-10.188.220.107" Function SetFirewallRule { param([string]$network, [bool]$IPv6=$false) # can be done bye wf.msc New-NetFirewallRule -DisplayName "Allow inbound ICMPv4" -Group "WW8" -Profile Private,Domain -Direction Inbound -Protocol ICMPv4 -IcmpType 8 -RemoteAddress $inst_networks -Action Allow New-NetFirewallRule -DisplayName "Allow inbound ICMPv4" -Group "WW8" -Profile Private,Domain -Direction Inbound -Protocol ICMPv4 -IcmpType 8 -RemoteAddress $network -Action Allow #New-NetFirewallRule -DisplayName "Allow inbound ICMPv6" -Direction Inbound -Protocol ICMPv6 -IcmpType 8 -RemoteAddress <local subnet> -Action Allow #Write-host $p1 -foregroundcolor cyan #Write-host $p2 -foregroundcolor Magenta } $hostip = Get-NetIPAddress -AddressFamily IPv4 -InterfaceIndex 7 | select IPAddress if($hostip -like "131.188.220.*") { $network131 = "LocalSubnet4" } if($hostip -like "10.188.220.*") { $network10 = "LocalSubnet4" } # nothing for 192.168.220.128/25 because it is shared with other institutes $hostname = $env:computername if($hostname -like "*sek*") { $networks = $management_nodes }else { # VMs are more open (reachable) $networks = $network131,$network192,$network10 } Foreach ($i in $networks) { SetFirewallRule $i Write-host $i -foregroundcolor cyan } # can be done bye wf.msc #New-NetFirewallRule -DisplayName "Allow inbound ICMPv4" -Group "WW8" -Profile Private,Domain -Direction Inbound -Protocol ICMPv4 -IcmpType 8 -RemoteAddress $inst_networks -Action Allow features/useless_demo_apps.ps1 +3 −4 Original line number Diff line number Diff line Loading @@ -82,13 +82,13 @@ Get-AppxPackage -AllUsers -Name Microsoft.Todos | Remove-AppxPackage Get-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -like 'Microsoft.Todos*'} | Remove-AppxProvisionedPackage -Online Get-AppxPackage -AllUsers -Name Microsoft.Whiteboad* | Remove-AppxPackage Get-AppxPackage -Name Microsoft.Witeboard* | Remove-AppxPackage Get-AppxPackage -AllUsers -Name Microsoft.Whiteboad* | Remove-AppxPackage Get-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -like 'Microsoft.Witeboard*'} | Remove-AppxProvisionedPackage -Online Get-AppxPackage -AllUsers -Name Microsoft.OfficeLens* | Remove-AppxPackage Get-AppxPackage -Name Microsoft.OfficeLens* | Remove-AppxPackage Get-AppxPackage -AllUsers -Name Microsoft.OfficeLens* | Remove-AppxPackage Get-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -like 'Microsoft.OfficeLensd*'} | Remove-AppxProvisionedPackage -Online Loading @@ -104,10 +104,9 @@ Get-AppxPackage -Name Microsoft.YourPhone | Remove-AppxPackage Get-AppxPackage -AllUsers -Name Microsoft.YourPhone | Remove-AppxPackage Get-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -like 'Microsoft.YourPhone*'} | Remove-AppxProvisionedPackage -Online Get-AppxPackage -Name *phone* | Remove-AppxPackage Get-AppxPackage -AllUsers -Name *WindowsPhone* | Remove-AppxPackage Get-AppxPackage -AllUsers -Name *commsphone* | Remove-AppxPackage Get-AppxPackage -Name *phone* | Remove-AppxPackage Remove-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -like 'phone'} | Remove-AppxProvisionedPackage -Online # Loading Loading
Firewall/set_ping_Rules.ps1 +47 −2 Original line number Diff line number Diff line # enable pings from other institute clients $inst_networks = "131.188.220.192/26,192.168.220.128/25,10.188.220.0/25" # Networks $network131 = "131.188.220.192/26" $network192 = "192.168.220.128/25" $network10 = "10.188.220.0/25" $management_nodes = "131.188.220.208/29","192.168.220.230-192.168.220.230.231","192.168.220.215","10.188.220.96-10.188.220.107" Function SetFirewallRule { param([string]$network, [bool]$IPv6=$false) # can be done bye wf.msc New-NetFirewallRule -DisplayName "Allow inbound ICMPv4" -Group "WW8" -Profile Private,Domain -Direction Inbound -Protocol ICMPv4 -IcmpType 8 -RemoteAddress $inst_networks -Action Allow New-NetFirewallRule -DisplayName "Allow inbound ICMPv4" -Group "WW8" -Profile Private,Domain -Direction Inbound -Protocol ICMPv4 -IcmpType 8 -RemoteAddress $network -Action Allow #New-NetFirewallRule -DisplayName "Allow inbound ICMPv6" -Direction Inbound -Protocol ICMPv6 -IcmpType 8 -RemoteAddress <local subnet> -Action Allow #Write-host $p1 -foregroundcolor cyan #Write-host $p2 -foregroundcolor Magenta } $hostip = Get-NetIPAddress -AddressFamily IPv4 -InterfaceIndex 7 | select IPAddress if($hostip -like "131.188.220.*") { $network131 = "LocalSubnet4" } if($hostip -like "10.188.220.*") { $network10 = "LocalSubnet4" } # nothing for 192.168.220.128/25 because it is shared with other institutes $hostname = $env:computername if($hostname -like "*sek*") { $networks = $management_nodes }else { # VMs are more open (reachable) $networks = $network131,$network192,$network10 } Foreach ($i in $networks) { SetFirewallRule $i Write-host $i -foregroundcolor cyan } # can be done bye wf.msc #New-NetFirewallRule -DisplayName "Allow inbound ICMPv4" -Group "WW8" -Profile Private,Domain -Direction Inbound -Protocol ICMPv4 -IcmpType 8 -RemoteAddress $inst_networks -Action Allow
features/useless_demo_apps.ps1 +3 −4 Original line number Diff line number Diff line Loading @@ -82,13 +82,13 @@ Get-AppxPackage -AllUsers -Name Microsoft.Todos | Remove-AppxPackage Get-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -like 'Microsoft.Todos*'} | Remove-AppxProvisionedPackage -Online Get-AppxPackage -AllUsers -Name Microsoft.Whiteboad* | Remove-AppxPackage Get-AppxPackage -Name Microsoft.Witeboard* | Remove-AppxPackage Get-AppxPackage -AllUsers -Name Microsoft.Whiteboad* | Remove-AppxPackage Get-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -like 'Microsoft.Witeboard*'} | Remove-AppxProvisionedPackage -Online Get-AppxPackage -AllUsers -Name Microsoft.OfficeLens* | Remove-AppxPackage Get-AppxPackage -Name Microsoft.OfficeLens* | Remove-AppxPackage Get-AppxPackage -AllUsers -Name Microsoft.OfficeLens* | Remove-AppxPackage Get-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -like 'Microsoft.OfficeLensd*'} | Remove-AppxProvisionedPackage -Online Loading @@ -104,10 +104,9 @@ Get-AppxPackage -Name Microsoft.YourPhone | Remove-AppxPackage Get-AppxPackage -AllUsers -Name Microsoft.YourPhone | Remove-AppxPackage Get-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -like 'Microsoft.YourPhone*'} | Remove-AppxProvisionedPackage -Online Get-AppxPackage -Name *phone* | Remove-AppxPackage Get-AppxPackage -AllUsers -Name *WindowsPhone* | Remove-AppxPackage Get-AppxPackage -AllUsers -Name *commsphone* | Remove-AppxPackage Get-AppxPackage -Name *phone* | Remove-AppxPackage Remove-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -like 'phone'} | Remove-AppxProvisionedPackage -Online # Loading