Sample files and links from The Ultimate Event II roadshow

During the roadshow we have done a lot of demos and most of the demos are based of scripts (PowerShell mainly) and we promised make sure that all our attendees could download them, so here they are.

You will find the rest of the scripts here

First Session: Getting data from SCVMM and Active Directory

#Get the number of VM’s
Get-SCVirtualMachine | Measure-Object

#Get all MACaddresses, group them and it is very easy to see if you have more then one nic with the same mac twice
Get-SCVirtualMachine | Select-Object -ExpandProperty VirtualNetworkAdapters | Group-Object MACAddress

#Get all the OS you are running and the amount of each version
Get-SCVirtualMachine | Group-Object OperatingSystem | Sort Count -Descending | Select Name, Count

#Get the number of unknown OS running in your fabric
Get-SCVirtualMachine | Where-Object { $_.OperatingSystem -like “Unknown” } | Group-Object Cloud | Select-Object Name, COunt

#Get all VM’s that are running on a snapshot, including the name and the date of the snapshot
Get-SCVirtualMachine | Select -ExpandProperty VMCheckpoints | Select VM, AddedTime

#Get the number of VM’s using a dynamic MacAddress
Get-SCVirtualMachine | Select -ExpandProperty VirtualNetworkAdapters | Where { $_.MACAddressType -eq “Dynamic” } | Measure-Object

#Get all the VM’s that are using a dynamic MacAddress
Get-SCVirtualMachine | Select -ExpandProperty VirtualNetworkAdapters | Where { $_.MACAddressType -eq “Dynamic” } | Select Name

#Get All Servers from OU,s and then get the nams and IP’s
$Servers = @(Get-ADComputer -Filter * -Properties ipv4Address, OperatingSystem -SearchBase “OU=Server,OU=Cloud,DC=cloud,DC=truesec,DC=com”)
$Servers += @(Get-ADComputer -Filter * -Properties ipv4Address, OperatingSystem -SearchBase “OU=Domain Controllers,DC=cloud,DC=truesec,DC=com”)

$Servers | Select-Object DNSHostName,ipv4Address | Out-GridView

Second Session: Ref Image and CustomSettings.ini

The sample files for customsettings.ini can be found here:



Categories: RoadShow

Tagged as:

2 replies »

    • If you just need the number, yes. However, this is one of those commands I just to just get me the number, fast. But if you need to use the count in a script, you are absolutely correct.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.