Quantcast
Channel: PS C:\>(Get-Virtual).info » Powershell
Browsing latest articles
Browse All 20 View Live

Powershell – function to Query a SQL database

# Today’s quick and easy function is a simple one that I regularly use to query a SQL database. It will return an object containing the result of your query – so makes SQL access very simply from...

View Article



Useful Function of the day – importing an Excel Spreadsheet to a Powershell...

Ever had to import a sheet from an Excel workbook . . and didn’t feel like saving as CSV . .or some other manual workaround? Drop the following function into your profile and you’re good to go . .

View Article

Script of the Day – Powershell Menu Select list

Sometimes you’d like to prompt a user to select an option from a list in Powershell . . try this:

View Article

Powershell – Script of the Day – Menu-Plus

Yesterday, we created a simple Powershell menu http://www.get-virtual.info/2011/01/26/script-of-the-day-powershell-menu-select-list/ Today’s script is a feeder for the menu, that allows you use any...

View Article

Script of the day – ping a range of IP addresses

Friday today, so just a quick and easy script . . nothing clever In PowerShell, ping functionality can be handled by using the ‘test-connection’ cmdlet, or simply using .Net A ping using...

View Article


Script of the day – writing to a cell in Excel

Ever needed to inject info to a cell in an Excel spreadsheet – repeatedly . . . you can do so from Powershell . . like so:

View Article

VMKFSTOOLS Man Pages

VMKFSTOOLS VMware ESX Server Manual VMKFSTOOLS NAME vmkfstools - VMware ESX Server file system management tool SYNOPSIS vmkfstools OPTIONS vmkfstools OPTIONS PARTITION vmkfstools OPTIONS DEVICE...

View Article

Script of the Day – changing ESX NTP servers

The following script will amend the NTP server settings for all ESX hosts in your VC

View Article


Script of the Day – import all VMs from a Datastore to VMWare ESX / ESXi

So your DC fell over . . but you have a copy of all your vmdks etc and would like to import them to a new ESX host . . The following script will run you through a series of prompt and then import all...

View Article


Script of the Day – shutdown your VMware ESX estate with PowerCLI

The following script is straight from http://www.virtu-al.net/2010/01/06/powercli-shutdown-your-virtual-infrastructure/ I have used it a few times and it is very effective and easy to use. BE WARNED –...

View Article

Monitoring VM Logs – Nearly real time monitoring – Script of the day

Today’s Script of the day is not one of my own, but one I have used a few times in the past few weeks – and I figured I should post here as a reminder for when I next need it. Written by the scripting...

View Article

Script of the Day – Creating AD groups without QAD cmdlets

We’re automating some server builds and need to create AD groups to manage resource access to each Server (company policy) We use SCCM for deployment and I wanted to automate the groups (at build time)...

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

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


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

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

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
Browsing latest articles
Browse All 20 View Live




Latest Images