Category: PowerShell5.1
-
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
-
Get ALL A User’s Groups
…get every group a user is in, including the Primary
-
Get Domain Users
The reason you cannot enumerate all ‘Domain Users’ members is due to size restrictions of the PowerShell commands,
-
VM PS Templates: Query VMs PoweredOn
This script renumerates through all the VCSAs and makes a big list of the PoweredOn VMs and runs a job against them, like TC (ping)
-
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
Add-WindowsFeature -Name “AD-Domain-Services” -IncludeManagementTools:$False -Confirm -ea Inquire -LogPath “C:\Users\$env:username\Documents\WindowsPowerShell\log\$day-RWDCPromo.log”
-
Set-MpPreference
As you can see, Microsoft’s syntax is wrong:They show the syntax for setting soft-passive mode as ‘Set-MpPreference -DisableRealtimeMonitoring $true’ when it is ‘Set-MpPreference -DisableRealtimeMonitoring:$true’ <– NOTE THE COLON??? Arrrrgghhhh! I cannot tell you how frustrating it is when code is not written to give you ANY response unless you get the syntax EXACTLY right. *SIGH*…
-
Gpupdate Latency Errors Lookup Script
I cannot TELL you how hard this was to write. Holy smokes the help on this is terrible.
-
Locate Pervasive Lockouts of AD Accounts
You can use PowerShell to search the Security event log for lockout events…