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

Install-Module SpeculationControl

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

Enable SSH on VMhost with PowerCLI

How to Enable SSH for VMhost with PowerCli

To enable SSH:

Get-VMHost <HostName> | Get-VMHostService | Where Key -EQ "TSM-SSH" | Start-VMhostService

Enable SSH via PowerCli

To disable SSH:

Get-VMHost <HostName> | Get-VMHostService | Where Key -EQ "TSM-SSH" | Stop-VMHostService -Confirm:$False

Disable SSH via PowerCli

– Stuart… 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

PowerShell to gather HP Warranty information

Using PowerShell to get HP warranty information

Have you ever need to find the warranty information for your environment’s workstations, and didn’t want to spend hours to get the answers.  That is where PowerShell and HP warranty API will come in handy.

Sign up for an HP Developer’s account

Before you can begin you will need to sign up for an account on HP’s website, https://developers.hp.com/. … Continue reading

PowerCli to Increase Hardware on Multiple VMs

The other night I had a task of upgrading 22 VMs with additional vCPUs and memory.  I also had a maintenance window of 60 minutes to get this completed.  So I wasn’t going to do this more than once, so I just wrote a simple PowerCli script that would handle this process for me.

$servers = "VMServer01","VMServer02","VMServer03","VMServer04","VMServer05"

foreach ($server in $servers){
Shutdown-VMGuest $server -confirm:$false
Do {
sleep -Seconds 5
$Status = (Get-vm $server).powerstate
If($status -eq "PoweredOff")
{"$Server has been powered off adding hardware"}
else{
"$server is still powered on looping until off"
}
}
While ($Status -eq "PoweredOn")

$TotalvCPU=6
$Cores=1
$VMname = get-vm $server
$spec=New-Object –Type VMware.Vim.VirtualMAchineConfigSpec –Property @{“NumCoresPerSocket” = $cores}
($VMname).ExtensionData.ReconfigVM_Task($spec)

$VMname | Set-VM -MemoryGB 28 -NumCpu $TotalvCPU -Confirm:$false

Sleep -Seconds 5
Start-VM $server -Confirm:$false
}

So this script starts off identifying the servers that the work is going to be performed on.… Continue reading

New Method for Installing PowerCLI

New Method for Installing PowerCLI

Starting with the newest version of PowerCLI, 6.5.1, the method for installation has changed from the typical MSI file to using the PowerShell Gallery.

Step 1. Uninstall PowerCLI

The first step is to uninstall PowerCLI from your system.  To do this use Add/Remove Programs.

Uninstall PowerCLI via Add/Remove Programs

Before Installing the New PowerCLI, the old installation needs to be removed.  … Continue reading

PowerShell to Configure iSCSI and MPIO

At work we have started to make a push to get as many servers off of RDM (Raw Device Mapping) drives in the virtual environment as we can. We use the RDM drives with MSCS (Microsoft Server Cluster Service) with SQL, but we do have a few application failover cluster as well. With this change we have an influx of iSCSI (Internet Small Computer Systems Interface) drive configurations along with  MPIO (Multipath I/O) configured.  … Continue reading

Loading Modules from Remote Server with PowerShell

Have you ever found yourself trying to run a command, and found out that you need to have modules loaded that are only installed on a remote server. I know I have many times, and trying to found the right module to download at times is nearly impossible.

So starting with PowerShell version 3.0, there is a now way to import a module from a remote machine.  … Continue reading

Building VMs using OSCustomizationSpec

With the release of Windows Server 2016, we did a complete overhaul of all of our VM templates.  The current way that I was building VMs (link to article) and configuring the NICs (link to article) stopped working because we increased the security footprint in the templates.  So I was stuck figuring out how to revamp my build script.  … Continue reading

Automation with Ecobee3, and Alexa

Ecobee3 Thermostat with Sensor

With all of the home automation articles floating around the web these days, I thought that I would take some steps to get my house some updates.  About 4 months back I had the HVAC system in my house replaced, but we didn’t opt for the installers to add a smart thermostat.  … Continue reading