Categories
server core

Enabling Previous Versions on Windows 2008 Server Core

Enabling Previous Versions for file shares on Windows 2008 when you have the full graphic’s interface is easy to do – but what about if all you have is the command line as you get in Server Core.

To turn on Previous Versions (shadow copies) via the command line follow these steps:

  1. From the command line on the server type:
    vssadmin add shadowstorage /for=c: /on=c: /MaxSize=5GB
  2. This will enable shadow copies on the volume, and this might be enabled already (esp. if you have already run a backup on the server). This particular command will do copies for the shares on the C: drive, with the storage for the copies also on the C: drive, and limiting that storage to 5Gb. Any of these options can be changed.
  3. Enable remote management on the Server Core firewall (again this might have already been done):
    Netsh firewall set service RemoteAdmin
    Netsh advfirewall set currentprofile settings remotemanagement enable
    Netsh advfirewall firewall set rule group=”File and Printer Sharing” new enable=yes
    Netsh advfirewall firewall set rule group=”Windows Firewall Remote Management” new enable=yes
  4. Then from a remote machine with the Task Scheduler MMC snap-in enabled, connect to the Server Core machine as an administrator level account and add the following scheduled task – 1 for each disk on the server:
    General>Name: Shadow Volume Copy
    General>User Account: Administrator level account (run whether logged in or not)
    Triggers>New: Weekly, 7am, Mon-Fri and Weekly, 12pm, Mon-Fri
    Actions>Start a program: %systemroot%\system32\vssadmin.exe
    Actions>Start a program>Arguments: Create Shadow /AutoRetry=15 /For=c: (changing C: if you have a different drive)
  5. Click OK and right-click the task and choose Run.
  6. Open a file share that is held on the Server Core machine and see if the Previous Versions tab shows a previous version having just been created.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.