Most Hyper-V or VMware vSphere hosts take advantage of virtual LAN tagging. VLAN tagging allows you to configure virtual machines to run on multiple VLANs over shared switch ports. In order to use these features, you must configure the physical network switch ports for trunking. My Hyper-V 2012 R2 hosts have four interfaces on two network adapters and many of the interfaces are dedicated to virtual machine traffic. These interfaces are connected to highly available Cisco Catalyst 2960-S switches via Ethernet. Here are the basic Cisco IOS commands necessary to enable a switch port to pass traffic on multiple VLANs.
If you leave out the allowed VLAN statement, it will pass all VLANs by default. The native VLAN statement tells the switch port which VLAN to use when the traffic is not tagged, which may be necessary in some cases.
For HP Procurve network switches and some other network switch brands, you can achieve the same result by using the "Tag" and "Untag" commands. In the switch port configuration, you would leave one VLAN untagged, which has same effect as the native VLAN statement in Cisco IOS. The rest of the VLANs being used for virtual machine traffic would be set to "Tagged" mode. In Cisco terms, the untagged VLAN would be similar to the native VLAN and the tagged VLANs would be allowed to pass.
I have a dusty old Windows Server 2003 box running Exchange Server 2003 in a corner of my technology office. Rather than trying to keep a Windows Server 2003 box secure and patched, I keep it powered off. I can't decommission it because once or twice a year I'm asked to recover email from it. When that time comes, I use the Export-Mailbox cmdlet to export the requested mailbox to a PST file. Sounds easy enough, but there are some annoying requirements that must be met before you can successfully run the cmdlet, which are listed at the bottom of this post.
There are a handful of ways to use the Export-Mailbox cmdlet, but in my case I simply needed the email off of the Exchange server and in a format that can used by the end user. Using the command below, I saved the mailbox to a PST file and gave a copy to the requester with instructions on how to open it in Outlook.
I'm often tasked with deploying client applications to many workstations on a network, and in most cases Group Policy or Microsoft Configuration Manager works perfectly for this sort of thing. However, PowerShell can handle the task just as well. For deploying an MSI package, a couple lines of code is usually enough to handle the task.
Thanks to the folks at FreeGeoIP.net, you can query their API for geolocation data by providing an IP address or Internet domain. The geolocation data can be produced in various formats including CSV, XML, and JSON. For this PowerShell snippet, we'll use the XML format.
Using Get-Geolocation I can retrieve location data for a public IP or online host. Here is an example.
UPDATE 9/16/2015: I found a free geolocation service called Telize that works great. The PowerShell commands below illustrate how easy it is to extract geolocation information from Telize.
Using the Invoke-RestMethod cmdlet, content can be queried from online geolocation providers to gather connection details such as public IP address and ISP location information. In this example I used a free service from ipecho.net to create the Get-PublicIP function. For older versions of PowerShell, you can use the Invoke-WebRequest cmdlet, but you must retrieve the IP address data from the object's content property.