Category: Windows

  • Check for GPO or run GPupdate Remotely

    Check for GPO or run GPupdate Remotely

    This script does lots of things that are handy when group policy (SysVol) replication is a problem… (like an environment still using FRS) My Thanks to Microsoft’s CoPilot for the help in sorting the logic of the try-else-catch commands…

  • Reverse Ping a 255.255.254 Scope

    Reverse Ping a 255.255.254 Scope

    To quickly obtain the devices using an IPv4Address in a scope reverse ping the scope in PowerShell (5.1) ‘#’ReverseLookup-Ipv4Address-By23Range.ps1’$subnet = read-host -Prompt “What IP scope with /23 range? -leave off the last octet numbers – like this 10.228.30. “for ($i=0; $i -le 511; $i++) { $ip = $subnet + $i Resolve-DnsName -name $ip -ea SilentlyContinue|select…

  • Remove Revoked Certificates

    Remove Revoked Certificates

    The removal of revoked certificates is not automatic…

  • Set PowerShell Credential

    Set PowerShell Credential

    …you can make the script prompt you for you admin credential or you can type it in manually, or adjust from your username for more elevation

  • Update ADSS Subnets

    Update ADSS Subnets

    The real advantage of this script is the ability it gives you to update your ADSS subnets quickly #Import the Active Directory moduleImport-Module ActiveDirectory -NoClobber -DisableNameChecking -Scope Local#Import the CSV with headers$csvData = Import-Csv -Path D:\powershell\input\subnets.csv#Checks for any count and breaks if not $nullif(!($csvData.Count)){break}#Loop through each row in the CSVforeach ($row in $csvData) {#Get the…

  • Update-Windows_Powershell.ps1

    Update-Windows_Powershell.ps1

    Updates Windows powershell modules, installs any not installed, and updates help for them all

  • Get ALL A User’s Groups

    Get ALL A User’s Groups

    …get every group a user is in, including the Primary

  • Get Domain Users

    Get Domain Users

    The reason you cannot enumerate all ‘Domain Users’ members is due to size restrictions of the PowerShell commands,

  • Get-ADGroup WildCard is BROKEN

    Get-ADGroup WildCard is BROKEN

    In the past (2018) you could use ‘like’ on Get-adgroup, like this:

  • PS Script to Promote 2019 Server to RWDC

    PS Script to Promote 2019 Server to RWDC

    Add-WindowsFeature -Name “AD-Domain-Services” -IncludeManagementTools:$False -Confirm -ea Inquire -LogPath “C:\Users\$env:username\Documents\WindowsPowerShell\log\$day-RWDCPromo.log”