Tag: Powershell
-
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
-
AI Automation for PowerShell
“You may have experimented with Microsoft’s AI Shell for PowerShell and felt that you didn’t need another chatbot. However, AI Shell isn’t a shell at all. Like many of Microsoft’s Copilots, it functions merely as a chatbot attached to your terminal, providing enhanced copy-and-paste capabilities.” “The AI Shell is compatible with Windows, macOS, and Linux. Please ensure…
-
Looper
Having a good looper is a great script to keep available… I wish I could remember where I got this form, but I thank you, Anony-Mouse scripter! [::mouse::]
-
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
The removal of revoked certificates is not automatic…
-
Set PS 5.1 to use PS 7 PSModulePath
…might as well prepare by using the D:\PowerShell path now with PS 5.1…
-
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
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
Updates Windows powershell modules, installs any not installed, and updates help for them all