This doesn’t seem like a difficult task, but configuring new roles in vCenter is just terrible. On my team at work we have one guy that does it all the time. When he does have to configure a new role he complains a lot about it, but because its so tedious. So when it can time for me to have to duplicate a role that we already have in one vCenter to another one, I wanted to see how difficult it would be to export the needed privileges and import them.… Continue reading
Tag: Get-Content
PowerShell to Get OS Type and Count
My manager asked for the count of Windows Server 2012 virtual servers. So I did a fast and dirty script to get just the count of Server 2012
$server2012 = ((get-vm).extensiondata.guest | Where GuestFullName -eq "Microsoft Windows Server 2012 (64-bit)").count
After I provided the results from this, I worked to make it a better, more robust script.… Continue reading
PowerShell to Remove Users from Cross Domain Groups
“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
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
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
Gather IP information from Multiple Servers
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
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
Using PowerShell to work with SSL Certificates
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
Find Registry Keys on Remote Servers
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