Tag Archives: network

Move vSwitch vlans information from old host to a new one

To use this examples, there requirements are: VMware PowerCLI and a VMWare vCenter.

This example will copy all vlan’s (Virtualportgroup) from one host to another.
It will take all vlan’s from vSwitch0 on the old host, and copy it to the new host on vSwitch1.

connect-viserver
$oldhost = get-vmhost -name OldServerIP
$newhost = get-vmhost -name NewServerIP
 
$oldhost | get-virtualswitch -name vSwitch0 | get-virtualportgroup | foreach { $newportgroup = $newhost | get-virtualswitch -name vSwitch1 | new-virtualportgroup -name $_.Name -VLanID $_.VLanID }

 

Problems with GPO and mapped network drive and shortcut

Today i have to create a GPO with a shortcut to an already mapped network drive.

Both the Shortcut and the mapped Network drive is created by GPO.

The mapped network drive mapped fine, but the shortcut wasen’t created at all. The Event viewer toll me that that the shortcut could not be created because the file was not found.

Instead of using File System object, i created a URL Shortcut, still to the exe file. This works, but now the icon was a Internet Explorer Icon.

In GPO you can customize the icon, under icon file path

.