Mindblown: an engineer’s journey through IT
-
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-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,
-
Get-ADGroup WildCard is BROKEN
In the past (2018) you could use ‘like’ on Get-adgroup, like this:
-
PowerShell/PowerCLI: UMount All ISOs At Once
Get-VM -Name $vm | Get-CDDrive | Set-CDDrive -NoMedia -StartConnected $false
-
Install Any Command Easily in PowerShell
That’s how you would install ANY module for a command you need. Now TELL me that’s not convenient!
-
HOWTO: Discover Where a LOCAL ISO is Mounted – Windows Server 2016/2012R2
..the ISO still throws the “Sorry…” error
-
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…
-
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)
-
Illegals Voting???
Illegal immigrants are voting in US elections Mar-23-2024, Live at 1030hrs ET (click the link above) Regardless of what the legacy news outlets say, there is a growing number of municipalities in America where non-U.S. citizens can vote. In fact, there are very few state constitutions that explicitly outlaw this practice. Furthermore, the list of…
-
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*…
Got any book recommendations?