Category Archives: Server

Change the Network Location in Server 2012 R2

I needed to configure a Windows 2012 R2 server for some services to test, but didn’t want to domain join it.  By default, the network location was listed as public.
As such, firewall rules were not being followed.
To change the network location, open gpedit.msc (Local Group Policy Editor), and navigate to Computer Configuration / Windows Settings / Security Settings / Network List Manager Policies.
Double click the Network name of network that you would like to change the location.
Select the Network Location tab, and set the location to relevant setting.
Click OK, and close Local Group Policy Editor.  The network location has now changed to the location you set.

Server 2003 Volume Shadow Copy Command Line (previous versions)

Using Server 2003, with the Server 2003 Resource Kit  (opens new window) installed, you can restore Shadow Copies from the command line with the command volrest.exe

For example, the file in question is:

 \svr2003serverdatasales2013Sales report sep 2013.doc”

Open a command prompt and type:

volrest “\svr2003serverdatasales2013sales report sep 2013.doc”

This gives us a list of the shadow copies available for that document.  Wildcards can also be used. 
EG: we could also have used:

volrest “\svr2003serverdatasales2013*report sep 2013.doc”
volrest “\svr2003serverdatasales2013*report*”
volrest “\svr2003serverdatasales2013*”

The switch /s  searches subfolders as well.  The command below will list all shadow copy files for the share serverdata.

volrest /s “\svr2003serverdata*”

We can see the date time the file was modified, size, and the time the shadow copy was created.

To restore, use the command:

volrest “\svr2003serverdatasales2013sales report sep 2013.doc” /r:\svr2003serverdatasales2013restored”

This will restore all the sales report sep 2013.doc copies available to a subfolder called restored.  If the restored folder doesn’t exist, it will be created.

The files are restored in reverse time order.  Eg: the newest files are created first, and subsequent files are renamed (1), (2), etc.

In the example above, the 287Kb file is called Sales report sep 2013.doc, and the 6Kb file is called Sales report sep 2013(1).doc