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 and Plink to Update Avamar Proxy Timeout Settings

When colleagues in the office have a repeatable process that can and should be scripted, I’m the person they seek out. This particular time it was a storage admin looking to see what could be done with verifying a setting in a file on a Linux appliance and changing the setting if it is not set to the preferred value.… 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

PowerShell and Math Homework

My 10 year daughter asked me to check her math homework tonight. Math was my best subject in school, but that was a long time ago. The assignment that she had was to find if several of numbers where divisible by 2, 3, 4, and 5. I started to look at it this and said that I could write a computer script to check the answers.… Continue reading

My 10 year daughter asked me to check her math homework tonight. Math was my best subject in school, but that was a long time ago. The assignment that she had was to find if several of numbers where divisible by 2, 3, 4, and 5. I started to look at it this and said that I could write a computer script to check the answers.… 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

PowerShell to Install Windows IIS Features

To XML install or not to XML install

For as long as I know, I have used PowerShell to install Internet Information System (IIS).  The method of which I use PowerShell to install the features have changed, but its still PowerShell.

Originally I was given an XML file that was generated, and I would use that to install the features, but once my scripting skills advanced I learned that there were other ways to do it. … 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

PowerShell Module for Speculative Execution Detection

PowerShell Module for Detecting Vulnerabilities to Speculative Execution

Microsoft today (Jan. 4th, 2018) provided a PowerShell module to detect  vulnerabilities related to Speculative Execution side-channel attacks.  This vulnerability affects  Intel, AMD and ARM processors, along with operating systems.  You can review the Microsoft security advisory ADV18002 here.

This will install the module to your local machine

*if you are having issues with install the module via the command above you can find the module on my github here.Continue reading

PowerShell to gather Lenovo Warranty information

Lenovo Warranty Information Lookup

To continue with the theme of my last post, I’m going to show how to gather the warranty information for Lenovo Servers.  This was a bit tricky as this isn’t an API call, but more of a website parsing.

Getting the Lenovo Server information

To be able to perform this warranty lookup, the server information will need to be retrieved, and what a better way than getting it from the VMhosts themselves.… Continue reading