Quantcast
Channel: PS C:>(Get-Virtual).info » Powershell
Browsing index pages (33 articles)

Who 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


Powershell 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 Article


Invoking 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 Article

Create 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 Article

Last 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 Article


Finding 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 Article

Useful 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 Article

Querying 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 Article


Powershell – 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 Article


Opening 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 Article

Using 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 Article

Finding 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 Article

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 Article


Identifying SAN disk usage using WMI – Powershell – Script of the Day

So I was commissioned with identifying the amount of actual disk space used by a bunch of Microsoft Servers that were attached to various SANs on our network. Unfortunately, despite us having a rather...

View Article

Copying data to/from a VM datastore using PowerCli – Script of the Day

Ever needed to copy data from your local machine to a VMware datastore . .and not felt like messing around with winSCP / FastSCP, the Datastore browser etc? PowerCli / PowerShell lets you create a new...

View Article


Script of the Day – Scripted start of Virtual Center (and supporting servers)...

There are many threads on the VM communities, debating whether it is better to run a VC on a physical host, or a VMWare host. My answer is always that running it as a VM is better, but the arguement...

View Article

Script of the day – Powercli one liner to get ESX host versions

So I was looking at an ESX estate that is managed by someone else and was hoping to do a few ‘Get-EsxCli’ queries. Of course Get-EsxCli only works properly from 4u2, so I needed to find a host that was...

View Article


Script of the day – testing if 2 IP addresses are on the same subnet

Ever needed to script around IP addressing issues on hosts and needed to determine whether 2 hosts are in fact on the same subnet or not? Try the following Function The code simply does a binary...

View Article

Script of the Day – new(ish) Powercli cmdlets Get-ESXTop – part 1

Ignore this post – found it written up far better than I could ever manage: http://www.lucd.info/2010/12/03/hitchhikers-guide-to-get-esxtop-part-1/#more-2790 When I have some time, I’ll write a wrapper...

View Article

Script of the Day – quick and easy VMware Powershell scripts

Today’s script of the day is more a collection of scripts (or rather an easy way of generating a bunch of scripts) Over at the VMware labs (http://labs.vmware.com/) they have released an awesome tool...

View Article
Browsing index pages (33 articles)


Latest Images