Applies to: VisualSVN Server 3.4 and later
VisualSVN Server includes a PowerShell module that provides server and repository administration cmdlets. The module installs automatically and does not require any additional configuration steps.
See the KB88: VisualSVN Server PowerShell Cmdlet Reference article for information on all the cmdlets available.
Running VisualSVN PowerShell cmdlets
The VisualSVN Server PowerShell module is a part of VisualSVN Server. You can start using the cmdlets immediately after the installation.
Depending upon your needs or preference the cmdlets can be executed from the Windows PowerShell console or as a part of a custom PowerShell script. In addition to that, VisualSVN Server has its own dedicated VisualSVN Server PowerShell console which you can run directly from VisualSVN Server Manager:
- Start the VisualSVN Server Manager console.
- Click Action | All Tasks.
- Click Start PowerShell.
The advantage of using the VisualSVN Server PowerShell console is that it always starts with the appropriate permissions and a PowerShell execution policy that allows running cmdlets.
See the next section if you have difficulties running the VisualSVN Server cmdlets.
VisualSVN Server PowerShell module requirements
This section addresses all possible misconfigurations that can block execution of VisualSVN Server PowerShell cmdlets or custom scripts containing these cmdlets. See the list below to determine the source of problems and identify the solution:
- Check the PowerShell version. The minimum PowerShell version required to run the VisualSVN Server cmdlets is 3.0. The recommended version is 4.0 or later.
- Ensure that you have permissions to administer VisualSVN Server. In order to work with the VisualSVN PowerShell module a user should either have local administrator permissions or be a member of the VisualSVN Server Admins group.
- Set an appropriate PowerShell execution policy. If you are getting "The term is not recognized" error, see the KB164: PowerShell Execution Policy does not allow to run VisualSVN Server cmdlets article for the details.
- Check that the PSModulePath environment variable contains a path to the VisualSVN PowerShell module. There is a possibility that the variable has been overridden by another application. By default, the module is located in C:\Program Files\VisualSVN Server\PowerShellModules folder and VisualSVN Server installer adds the path to the variable automatically.