If your a developer like myself in a corporate setting, there are MANY advantages to using a Virtual PC from time to time. Including: to test different setups, research bugs that have been reported in a new environment, to test out new tools that have been released without potentially messing up your local image.. just to name a few.
The problem is when you create a new image, you need to join the corporate domain in order to get to resources you need on the network. This can be problematic for several reasons. For starters, your network team might not respond kindly to you calling once a week to join a Virtual machine to the network (if the even respond kindly to you calling once). Depending on the policies in place each time you boot up a Virtual Image you may have to wait for ever for it to update stuff being pushed down from the domain.
There is another way.
When you create your image, you need to create a local user with the same network ID that is used on your corporate domain. Say your domain is ACME and your user name is JSMITH (acme\jsmith). Create a local user account called jsmith. The password does not need to match.
Once you are logged into the local Virtual PC you can create links to network shares by using the "net use" command. For example, if you have server called acmefil01 that you use or you have applications that use issue the following command in a command prompt:
net use \\acmefil01 mydomainpasswordgoeshere /user:acme\jsmith
Now you will be able to access resources such as \\acmefil01\somefolder with easy.
Now the neat part is you access print servers to setup network printers too:
net use \\acmeprintserver01 mydomainpasswordgoeshere /user:acme\jsmith
If you want to map a drive to a drive letter, say your network personal drive use a command such as:
net use p: \\acmefil01\users\jsmith mydomainpasswordgoeshere /user:acme\jsmith
Which will map it to your P drive.
You can even get Microsoft SQL Server working in most cases if they have Named Pipes installed on the server, since kerberos authentication will not work since you are not on the domain.
The first thing you will need to do is make sure you are authenticated to the server box by creating a net use connection do it such as:
net use \\acmesql01 mydomainpasswordgoeshere /user:acme\jsmith
Now when you start up SQL Server Management Studio, just add np: in front of the server you want to connect to, for example:
You can even run your .NET applications by adding the np: in your App.Config files. Your connection string might look something like this:
<add key="PROFILE_DB" value="data source='np:acmesql01';initial catalog=ACMEDB;Integrated Security=SSPI;" />
Now it's probably helpful to create a script file to run to set things up when you login and just pass your password into that script. That way your print server, Sql Server, and file servers will be all setup. Here is a sample of what that script might look like. Save the following in a file called logon.bat in the root of your c drive (updating with real info obviously):
net use \\acmefil01 %1 /user:acme\jsmith
net use \\acmeprintserver01 %1 /user:acme\jsmith
net use p: \\acmefil01\users\jsmith %1 /user:acme\jsmith
net use \\acmesql01 %1 /user:acme\jsmith
Then from Start Run you can call it as: c:\login.bat mydomainpasswordgoeshere
Hope this helps someone...