Powershell – (Get-virtual).info – RSS Capture with Powershell through a proxy
a little geekery . . . As the blog is called ‘Get-Virtual’ . .I figure we may as well have a cmdlet / function to allow us to actually get the content of get-virtual . . . so I quickly put together an...
View ArticleFinding VMs with disks on multiple different datastores – Script of the Day
I was looking at a VM on one of our hosts and noticed the rather odd configuration showed that the VM had 2 disks provisioned (not unusual), and that the 2 disks had been presented on different storage...
View ArticleUsing regular expressions to parse files in PowerShell – Script of the Day
How often do you find yourself needing to identify a string in a file somewhere. For example, you have a log file, or a config file and you know it contains an IP address, but you do not want to...
View ArticleOpening a Port on a Windows machine using Powershell
Quick one today . . Someone in the office asked me how to quickly open a TCP port on a Windows host in order to do some firewall / port testing across vlans. I figured, let’s do it in Powershell –...
View ArticlePowershell – Converting multiple return values to single strings for reports
Sometimes, you’re writing a little Powercli / Powershell code to generate a report and the repotr you generate retuns multiple values for some lines. for example, you want a report showing each ESX...
View ArticleQuerying BMC ADDM / Atrium from Powershell.
We have a new discovery appliance at a client site – BMC atrium. I was having a look at it and unfortunately it does not have a normal SQL backend . . so it is not as easy to collect information as I...
View ArticleUseful scripts for amending the number of ports per vSwitch
We have found that on many (most) of our ESX hosts, we run at risk of running our of vbSwitch ports when we run through our maintenance periods and reduce the number of hosts in a cluster. Below are...
View ArticleFinding an unsused IP address on a subnet using Powershell
I have been doing a bunch of P2Vs lately and sometimes when VMWare converter decides to not play along, I resort to offline conversions using Platespin convert. Platespin likes to have about 4 IPs...
View ArticleLast boot time with PowerShell
Has to retrieve a bunch of boot times for a list of servers – quickly put together a function (I know there are many equally easy ways – but felt like retrieving info via PowerShell as part of a bigger...
View ArticleCreate ESXi Host firewall rules using PowerCli
Recently, I needed to create some custom firewall rules on ESX hosts (lots of them) – for some Syslog servers that were in addition to our existing Syslog servers. Here was my appraoach (note –...
View ArticleInvoking SSH commands using powershell (kinda)
Sometimes, you need to fire SSH commands from a Powershell session. This is quite quick and easy if you have the right tools. First of all, get the Posh-SSH cmdlets off github:...
View ArticlePowershell behind a Proxy server
so there I was, living in my Powershell session, when I stumbled across a cmdlet that looked kinda useful. I wanted a little more info, but when I ran “get-help ” – I discovered that my local help...
View ArticleWho fancies knowing when the rugby is on?
Been messing around with some regex for some boring work related consumption of poorly constructed data – when I thought why not do something useful? Rugby world Cup is around the corner – let’s make...
View Article