Change Windows IP address settings remotely with psexec and netsh

Download psexec from Sysinternals / MS. It only needs to be installed on the machine you run the commands from, not the targets.

* All machines must be in the same domain or workgroup
* Firewalls must be down on the targets (haven’t checked exactly which ports, so lowered them for domain access in my case)
* Ideally, create/use a local admin user on each remote machine for execution

Change from DHCP to static IP (note the “-h” for elevated admin access):
psexec \\<remote-computer-name> -u <remote-admin-user> -p <password> -h netsh interface ip set address name=”<interface-name>” static addr=<ip> <mask> <gateway> 1

Since the IP change command doesn’t include DNS settings we also need the the below:

Change DNS settings:
psexec \\<remote-computer-name> -u <user> -p <password> -h netsh interface ip set dns name=”<interface-name>” static addr=<ip>

Example changing the settings remotely on a Japanese Windows 7 machine from a Windows 2012 R2 server:
psexec \\Win7-01 -u admusr -p Passw0rd! -h netsh interface ip set address name=”ローカル エリア接続 2″ static addr= 1

psexec \\Win7-01 -u admusr -p Passw0rd! -h netsh interface ip set dns name=”ローカル エリア接続 2″ static addr=


If you’re uncertain of the interface name: Run “ipconfig” remotely and copy and paste the interface name from there.
psexec \\<remote-computer-name> -u <remote-admin-user> -p <password> ipconfig


Hyper-V Error (23001) Cannot create or update a non highly available virtual machine

OK, so you created a Hyper-V cluster using clustered, shared storage (CSV) and installed SCVMM. Now when you try to deploy a VM to a cloud it won’t work. Your clouds are listed with zero stars for compatibility and the below, rather cryptic, error message will be shown:

Full Error message:
Error (23001) Cannot create or update a non highly available virtual machine because the path C:\ClusterStorage\Volume1\Virtual Hard Disks\ is a clustered resource. Recommended Action Ensure that the path exists and that the path is not a cluster disk or cluster shared volume, and then try the operation again.

This happens if the cloud is configured to use clustered storage but the VM hardware profile doesn’t have a check in the “Make this virtual machine highly available” checkbox.

Thank you for the useful error messages MS. They really make me want to pull my hair out.


Enabling SNMP on a Dell MXL blade switch (running FTOS)

It’s very easy to enable SNMP 1.0 / 2.0 management of the Dell MXL blade network switches. All it takes is one command really (“snmp-server community public ro”).

SSH to the network switch (MXL):
jonas@nyx:~$ ssh root@
root@’s password:

Verify that there is no current SNMP configuration present:
TOKSCA4A2-MXL#show running-config snmp

Enter config mode and enable your community name – in this case “public” and specify if it’s Read-Only or Read-Write. In this case we use read only (ro):
TOKSCA4A2-MXL(conf)#snmp-server community public ro

Verify that it worked:
TOKSCA4A2-MXL#show running-config snmp
snmp-server community public ro

All done! Add the switch to your SNMP manager (OME for example).


Enabling VNC on iDRAC7 with RACADM

Example of enabling the VNC server on an iDRAC and setting the password:
racadm -r -u root -p calvin set idrac.vncserver.enable Enabled
racadm -r -u root -p calvin set idrac.vncserver.Password calvin

Note: Default port for VNC on the iDRAC is 5901

Connection example can be found here.

Reset XenDesktop VM name count

NOTE: For this to work the commands need to be executed via the PowerShell console in Citrix Studio. The normal PowerShell interface won’t work.

PS C:\Program Files\Citrix\Desktop Studio> Get-AcctIdentityPool

AvailableAccounts : 0
Domain : VGPU.demo
ErrorAccounts : 0
IdentityPoolName : Win7
IdentityPoolUid : c00bf2a9-3cca-46bd-b24a-0edfa25d1372
InUseAccounts : 4
Lock : False
MetadataMap : {}
NamingScheme : Win7-0#
NamingSchemeType : Numeric
OU :
StartCount : 5
TaintedAccounts : 0
Scopes :

PS C:\Program Files\Citrix\Desktop Studio> New-AcctADAccount -IdentityPoolName "Win7" -Count 1 -StartCount 1