This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Devices joined to a domain, which receive these via GPO | |
netsh advfirewall firewall show rule name="Outbound SMB: Allow to LAN" type=dynamic >nul || netsh advfirewall firewall add rule name="Outbound SMB: Allow to LAN" protocol=TCP remoteip="10.0.0.0/8,172.16.0.0/12,192.168.0.0/16" remoteport=445 action=allow dir=out | |
netsh advfirewall firewall show rule name="Outbound SMB: Block All" type=dynamic >nul || netsh advfirewall firewall add rule name="Outbound SMB: Block All" protocol=TCP remoteip=any remoteport=445 action=block dir=out | |
netsh advfirewall set allprofiles state on | |
netsh advfirewall set allprofiles firewallpolicy blockinbound,allowoutbound | |
# Devices NOT joined to a domain, or which don't receive these via GPO | |
netsh advfirewall firewall show rule name="Outbound SMB: Allow to LAN" >nul || netsh advfirewall firewall add rule name="Outbound SMB: Allow to LAN" protocol=TCP remoteip="10.0.0.0/8,172.16.0.0/12,192.168.0.0/16" remoteport=445 action=allow dir=out | |
netsh advfirewall firewall show rule name="Ou |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$action1supportedApps = @("1Password", | |
"7-Zip", | |
"Adobe Acrobat Reader DC", | |
"Adobe Acrobat Reader DC MUI", | |
"Adobe AIR", | |
"Adobe Animate 2023", | |
"Adobe Animate 2024", | |
"Adobe Audition 2023", | |
"Adobe Audition 2024", | |
"Adobe Bridge 2023", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find all user profiles | |
$users = Get-ChildItem C:\Users -Directory -Exclude '*Public*', '*Default*' | |
function Get-Extension-Name-For-Edge($extensionId) { | |
$url = "https://microsoftedge.microsoft.com/addons/detail/$($extensionId)" | |
$WebRequest = Invoke-WebRequest -Uri $url -ErrorAction Stop -UseBasicParsing | |
if ($WebRequest.StatusCode -ne 200) { | |
return "Unknown - $($extensionId)"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ErrorActionPreference = "Stop" # This prevents the registry key from being removed if it couldn't be backed up. | |
$name = "Carbon Black Cloud Sensor" | |
$cbProducts = Get-ChildItem "Registry::HKEY_CLASSES_ROOT\Installer\Products" | Where { $_.GetValue('ProductName') -imatch $name } | |
$regBackups = New-Object System.Collections.ArrayList | |
function Base64-Encode($file) { | |
$fileContent = Get-Content -Path $file -Raw | |
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($fileContent)); | |
} |
OlderNewer