Tag: Windows

  • Recurse with Grep (SLS in PS 5.1)

    Recurse with Grep (SLS in PS 5.1)

    The diffculty at finding this was unnecessary Linux guys… sheesh! The first line shows how to recurse a sls/grep search in Powershell for specific content of PS scripts, in subdirectories, not the .\, while the second line gives an example on how to get the list you can then call a program against, like ISE…

  • Check-WinEvents-Prompted.ps1

    Check-WinEvents-Prompted.ps1

    ‘Check-WinEvents-Prompted.ps1’ #************************************************************************************************************* # Script Name : Get-Latest-WinEvent-Prompted-DCs # Purpose : Check Latest Event log for DCs chosen # Date : #.\Get-UpdateDate.ps13:32 PM 3/13/2024 # – Initial version # Date : #.\Get-UpdateDate.ps11:12 PM 3/14/20244 # – Updated to reflect specific events, added credentials, added prompts # Author : Patrick Burwell #************************************************************************************************************* #Set location first set-location D:\PowerShell…

  • Confirm Windows Server In-place Upgrade to 2025

    From 4SysOps: Confirm Windows Server in-place upgrade to 2025 Current version Upgrade to Windows Server 2025? Windows Server 2012 ❌ No Windows Server 2012 R2 ❌ No Windows Server 2016 ✅ Yes Windows Server 2019 ✅ Yes Windows Server 2022 ✅ Yes https://4sysops.com/archives/check-the-windows-server-version-to-determine-if-an-in-place-upgrade-to-server-2025-is-supported

  • Check-Uptime-DC-Prompt.ps1

    Check-Uptime-DC-Prompt.ps1

    Sometimes a simple script makes life easier…

  • Get-Pagefile

    Quickly get the remote pagefile of a window server

  • Log Specific IPV4 Traffic When Found

    Log Specific IPV4 Traffic When Found

  • 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…

  • HOWTO-Run Robocopy Hard and Fast

    HOWTO-Run Robocopy Hard and Fast

    To ignore errors and make Robocopy proceed without stopping, you can adjust the `/R` and `/W` switches in your command. The `/R` switch specifies the number of retries on failed copies, and the `/W` switch specifies the wait time between retries². To force Robocopy to copy a file regardless of its condition, you can use…

  • 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…