I loath the Nexus 1000v. That is all…
I loath the Nexus 1000v. That is all…
In this post I talked about automated deployment that launches the remote console for me. Since I had 24 hosts that need the user & role, I created a script that does it for me. Nothing special, just something quick that works…
This is a follow-up to my last post about fully automated deployment
Below is the script. After it pulls the information from you, it creates the VM, adds the second disk, sleeps for 15 seconds, pulls the MAC from the new VM, creates the computer object in SCCM, adds it to the collection, sleeps for 15 seconds, refreshes the collection, sleeps for 15 seconds, then powers on the VM. If you’ve got a mandatory OSD advertised to the collection specified, and the OSD is fully automated, it will lay down the OS and the computername will be the name you provided to the script.
So I’m creating a script that builds a VM for you, imports the NetBIOS name & MAC address into SCCM, adds it to a specific collection, and then powers on the VM. If you have a mandatory OS Deployment for that collection, you don’t have to do anything but sit back and watch (given your Task Sequence is fully automated).
It prompts you for vCenter name, VM name, cpu, ram, description, disk size, queries vcenter for clusters, networks, datastores (sorted by free space), and verifies with you before building…
I’m excited & pleased that it’s actually working. It’s currently proprietary to my work environment, but I will try to strip all that out and let you change what needs to be changed to use it where you like.
Happy Scripting!!!
I’ve recently had a ton of requests for information about specific VMs. They want to know how many disks they have, CPU count, how much RAM, and which environment the VM resides in.
Instead of constantly searching vCenter, I wrote this quickly during the meeting to query multiple servers.
I recently had a requirement to build a script that listed all PST files on some of our DFS folders. I know there are a bunch of ways to get this done, but I wanted to build my own way. Since we needed to search roughly 20 directories, I decided to play with the Start-Job cmdlet so I could have one script to spawn multiple worker processes. At first, it was tricky (since I had never even messed with it), but anyone can easily pick it up.
Another app I wrote in May of 2006 in VB.Net, apparently my “first” app according to my comments. I’ve written others in VB.net 5.0, 6.0, and 2003 for class, but I guess this was one I actually wrote for a void I needed to fill. I worked in an IT shop dwarfed by the rest of the company. I’m sure several of you have dealt with the politics of upper management viewing IT as a monetary black hole. This was us, wanted us to make everything work, without giving us anything to work with. That’s a whole different rant, though, so I’ll cut to the good parts.
I wrote this app some time in January of 2007 in VB.Net 2003 (maybe 2005). I ran an FTP server on Windows 2003 and could see in the logs where I’d have thousands of failed login attempts, which turned out to be dictionary attacks. I got tired of manually blocking the source IPs and started kicking around ideas around stopping them.
Enter FTPLockDown
A reader on a previous post asked about pulling host UUIDs, so I wipped together this script.
Usage is like this:
Get-VMHostUUID.ps1 -vmhosts ("host1","host2","host3")
or
Get-VMHostUUID.ps1 -vc vcenterserver -container cluster1/folder/dc/etc
Using DRS in vSphere is a great thing for load balancing your cluster, but what if you need to keep one VM from vMotioning to another host? Everyone mention’s host affinity when searching, but digging through the DRS settings doesn’t really show much.
The closest thing to ‘Host Affinity’ is this KB article from VMware.