“How would you remove over 1,000 users from 10 different AD groups?” Another engineer on my team asked me this, and my answer without a beat, PowerShell.
The work environment has many different domains and several forests. So this shouldn’t be a difficult process. So I started with the simple approach, of getting the Users.txt… Continue reading
PowerCLI to Generate Nested VM Folder Structure
We are currently starting to plan for a disaster recovery test, and the first part is configuring Site Recovery Manager (SRM). We are still in the middle of the infrastructure replacement, so we are starting from scratch with everything. So for SRM to work the best we need to have identical folder structures in both locations.… Continue reading
PowerShell to Find Users in Multiple AD Groups
Another of the engineer that I would with came to me with a scripting issue. They had a list of 185 users account that he needed to find if they were members of a list of 6 AD groups. So that is where PowerShell and I come into this issue. … Continue reading
Gateway to PowerShell Scripting
One of the admins on my team asked the question to me, “How would I get the gateway information from a list of servers?”
I stopped to ponder this issue, and immediately said, “WMI queries is the way I would do this.”
The Thought Process to Select WMI
In my environment PowerShell remoting isn’t configured everywhere, so it wouldn’t be a good option.… Continue reading
Use PowerCLI to Get Log File When Tools are Broken
Over the past weekend we had a massive push of VMware Tools and VM hardware updates. For the most part this push was smooth except for 2 machines. Of course these 2 machines are high priority development machines and rebuild just won’t work.
Trying to get a log file off a machine that doesn’t allow for the drivers to install becomes when trying to research the issue. … Continue reading
At my office we have a certificate renewal process that happens every other year. This year, we have a plan to document the location of all of the certificates that are installed on the servers to help the next time the renewal happens. So I have worked out a quick and simply one liner that will get all of the certificates installed on the server in the LOCALMACHINE\My certificate store.… Continue reading
I was tasked with writing a script to find a single registry key on all of the server for a domain that my team manages. So after getting the key that we need to know the value of, I put a script together. The script will first check to see if the server is online, and if it is then the scripts looks at the registry to find the key and records the value. … Continue reading