Start SharePoint virtual machines via command line

Like it or not, there is no better choice except developing SharePoint 2010 using a virtual machine. While VMWare is pretty good, it is also a bloated software. My machine runs two vm-s, trying to simulate a real-world SharePoint environment – one being the DNS and hosting the AD and SQL Server 2008 R2 and another the Windows Server 2008 R2, Visual Studio 2010 and SharePoint 2010 itself. Since I have to stop and start VMWares frequently, I found the following command line script very useful.


net start "VMWare Agent Service"
net start "VMWare Authorization Service"
net start "VMWare DHCP Service"
net start "VMWare NAT Service"
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun" start "C:\VirtualMachines\sqlserver.vmx"
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun" start "C:\VirtualMachines\sharepoint.vmx"

Save the above file as a batch file and store in a directory accessible by PATH.

For stopping, reverse the commands, use “suspend” instead of “start”.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: