VisualSVN Server PowerShell Cmdlet Reference

This reference provides descriptions and examples for all VisualSVN Server PowerShell cmdlets. Cmdlets are listed in alphabetical order based on the verb at the beginning of the cmdlet.

Tip
Read the KB165: Using VisualSVN Server PowerShell module article for instructions on how to run the PowerShell cmdlets.
Cmdlet Description
Add-SvnAccessRule Adds a new rule that controls access to Subversion repositories.
Add-SvnLocalGroupMember Adds users or groups to a local Subversion security group.
Add-SvnRepositoryHook Adds a new repository hook to Subversion repositories.
Backup-SvnRepository Performs a backup of the Subversion repository.
Convert-SvnRepository Converts a regular Subversion repository to a distributed VDFS format and vice versa.
Disable-SvnJob Disables a background job.
Enable-SvnJob Enables a previously disabled background job.
Export-SvnRepository Exports a Subversion repository in one of the available formats.
Get-SvnAccessConfiguration Returns the per-repository authorization settings.
Get-SvnAccessRule Retrieves a list of rules that control access to Subversion repositories.
Get-SvnEffectiveAccess Returns the effective access permissions that a user has to the specified path.
Get-SvnJob Retrieves a list of configured background jobs.
Get-SvnLocalGroup Retrieves a list of local Subversion security groups configured in VisualSVN Server.
Get-SvnLocalGroupMember Retrieves a list of members from a local Subversion security group.
Get-SvnLocalUser Retrieves a list of local Subversion user accounts.
Get-SvnRepository Retrieves a list of Subversion repositories.
Get-SvnRepositoryBackup Retrieves information about repository backups.
Get-SvnRepositoryHook Retrieves a list of the repository hooks configured in VisualSVN Server.
Get-SvnRepositoryItem Retrieves a list of files and folders for the specified path in a Subversion repository.
Get-SvnRepositoryItemLock Retrieves the list of locked files in a Subversion repository.
Get-SvnRepositoryReplication Removed in VisualSVN Server 5.0.
Get-SvnServerConfiguration Returns the configuration settings of a VisualSVN Server instance.
Get-SvnServerLicense Returns details about the license installed on a VisualSVN Server instance.
Import-SvnRepository Imports a repository or a repository dump from the specified path.
Invoke-SvnJob Runs a background job and waits until it completes.
Measure-SvnRepository Measures the disk space occupied by Subversion repositories.
New-SvnLocalGroup Creates a local Subversion security group.
New-SvnLocalUser Creates a local Subversion user account.
New-SvnReplicationAuthentication Creates a PowerShell object with the authentication settings for VDFS replication.
New-SvnRepository Creates a Subversion repository.
New-SvnRepositoryItem Creates a folder in a Subversion repository.
New-SvnServerCertificateRequest Generates a Certificate Signing Request (CSR) to be sent to a Certificate Authority.
Remove-SvnAccessRule Deletes one or more rules that control access to Subversion repositories.
Remove-SvnLocalGroup Deletes a local Subversion security group.
Remove-SvnLocalGroupMember Removes members from a local Subversion security group.
Remove-SvnLocalUser Deletes a local Subversion user account.
Remove-SvnRepository Deletes a Subversion repository.
Remove-SvnRepositoryHook Deletes one or more repository hooks.
Remove-SvnRepositoryItem Deletes a file or a folder in a Subversion repository.
Remove-SvnRepositoryItemLock Removes the locks from the specified files in a Subversion repository.
Rename-SvnRepository Renames a Subversion repository.
Restore-SvnRepository Restores a Subversion repository from backup.
Resume-SvnRepository Resumes a suspended (read-only) VDFS repository.
Select-SvnAccessRule Returns a list of access rules that apply for the specified path in a Subversion repository.
Set-SvnAccessConfiguration Modifies the per-repository authorization settings.
Set-SvnAccessRule Modifies an existing access rule that controls access to Subversion repositories.
Set-SvnLocalUser Modifies properties of an existing local Subversion user account.
Set-SvnRepository Modifies settings for a Subversion repository.
Set-SvnRepositoryHook Modifies the content of existing repository hooks.
Set-SvnRepositoryReplication Removed in VisualSVN Server 5.0.
Set-SvnServerConfiguration Modifies the VisualSVN Server configuration settings.
Set-SvnServerLicense Updates the license on a VisualSVN Server instance.
Start-SvnJob Starts a background job.
Stop-SvnJob Stops a background job.
Suspend-SvnRepository Makes a VDFS repository read-only temporarily.
Switch-SvnRepository Switches replication role for a VDFS repository.
Sync-SvnRepository Forces a slave VDFS repository to replicate data from the master repository.
Test-SvnRepository Verifies the integrity of data stored in a Subversion repository.
Test-SvnRepositoryBackup Verifies the integrity of repository backups.
Update-SvnRepository Upgrades the repository to the latest Subversion repository format.

Add-SvnAccessRule

Available since VisualSVN Server 3.4.

Adds a new access rule to Subversion repositories. Access rules can be configured globally for all repositories or for a specific path in a particular repository.

VisualSVN Server may be configured to use either Windows or Subversion authentication. Each mode has its own set of access rules. By default, all access rule cmdlets work with the access rules from the currently active authentication mode. To work with the access rules from an inactive authentication mode, for example, to edit Subversion access rules when the server is using Windows authentication, please pass the appropriate AuthorizationProfile parameter. See the examples below.

Example 1: Add a global read/write access rule for a Devs user group

Add-SvnAccessRule -Global -AccountName contoso\Devs -Access ReadWrite

Example 2: Add a read-only access for the trunk folder in the MyRepo repository

Add-SvnAccessRule MyRepo -Path /trunk -AccountName contoso\Devs -Access ReadOnly

Example 3: Add a global read-only access for the BUILTIN\Users Windows account using its SID string

Add-SvnAccessRule -Global -AccountId S-1-5-32-545 -Access ReadOnly

Example 4: Add read-only access for the local Subversion account 'jack'

Add-SvnAccessRule -AuthorizationProfile SubversionLocal -Repository MyRepo -Path /trunk -AccountName jack -Access ReadOnly

Add-SvnLocalGroupMember

Available since VisualSVN Server 4.2.

Adds users or groups to a local Subversion security group.

Example 1: Make user 'jack' a member of group 'users'

Add-SvnLocalGroupMember users (Get-SvnLocalUser jack)

Example 2: Make group 'users' a member of group 'admins'

Add-SvnLocalGroupMember admins (Get-SvnLocalGroup users)

Example 3: Add all members of group 'users' to group 'admins'

Add-SvnLocalGroupMember admins (Get-SvnLocalGroupMember users)

Add-SvnRepositoryHook

Available since VisualSVN Server 3.5.

Adds a new repository hook to Subversion repositories.

Example 1: Add a new pre-revprop-change hook for the MyRepo repository with the "exit 1" content

Add-SvnRepositoryHook MyRepo -Type PreRevpropChange -Content "exit 1"

Example 2: Add a new pre-revprop-change hook with the “exit 1” content for all slave VDFS repositories

Get-SvnRepository -Type VdfsSlave | Add-SvnRepositoryHook -Type PreRevpropChange -Content "exit 1"

Example 3: Copy all existing repository hooks from the MyRepo repository to a NewRepo repository

Get-SvnRepositoryHook MyRepo | foreach {Add-SvnRepositoryHook NewRepo -Type $_.Type -Content $_.Content}

Backup-SvnRepository

Available since VisualSVN Server 3.6.

Performs a backup of the Subversion repository.

Starting from VisualSVN Server 3.8, this cmdlet supports creating encrypted backups using the ‑EncryptionMethod and ‑EncryptionPassword parameters, and supplying custom credentials for remote destinations with the ‑Credential parameter. Note that using these parameters requires PowerShell 4.0 or later to be installed on the machine.

Example 1: Backup all repositories to the default backup destination

Backup-SvnRepository *

Example 2: Backup the MyRepo repository to the specified destination folder

Backup-SvnRepository MyRepo -DestinationPath \\storage\Share

Example 3: Backup the MyRepo repository to the specified destination file

Backup-SvnRepository MyRepo -DestinationPath \\storage\Share\MyRepo.vsvnbak

Example 4: Backup the MyRepo repository to the default backup destination with AES-128 encryption

$password = Read-Host -AsSecureString
********************
Backup-SvnRepository MyRepo -EncryptionMethod AES128 -EncryptionPassword $password

Example 5: Backup the MyRepo repository to the specified remote destination using custom credentials

Backup-SvnRepository MyRepo -DestinationPath \\storage\Share -Credential (Get-Credential)

Convert-SvnRepository

Available since VisualSVN Server 3.4.

Converts a regular Subversion repository to a distributed VDFS format and vice versa. Conversion is performed in-place and requires all VisualSVN Server services to be stopped before the operation.

Note that a regular Subversion repository can be converted only to a master VDFS repository. Convert-SvnRepository cmdlet is not supported for slave VDFS repositories.

Example 1: Convert the MyRepo FSFS repository to a master VDFS repository

Convert-SvnRepository MyRepo -TargetType VdfsMaster

Disable-SvnJob

Available since VisualSVN Server 3.6.

Disables a background job.

Example 1: Disable the background job MyJob

Disable-SvnJob MyJob

Enable-SvnJob

Available since VisualSVN Server 3.6.

Enables a previously disabled background job.

Example 1: Enable the background job MyJob

Enable-SvnJob MyJob

Export-SvnRepository

Available since VisualSVN Server 4.0.

Exports one or multiple repositories to the specified location in one of the following formats:

  • as ordinary copy of the existing repository (in the native repository format)
  • as uncompressed dump
  • as GZIP-compressed dump

Also, the -AsReplicationSeed switch can be used to export VDFS master repositories as replication seeds.

Example 1: Export all repositories to a network share

Export-SvnRepository * -DestinationLocation \\storage\Share

Example 2: Export the MyRepo repository as \\storage\Share\Repo

Export-SvnRepository MyRepo -DestinationLocation \\storage\Share -DestinationName Repo

Example 3: Export the MyRepo repository as compressed dump

Export-SvnRepository MyRepo -DestinationLocation \\storage\Share -Format CompressedDump

Example 4: Export the MasterRepo VDFS master repository as replication seed

Export-SvnRepository MasterRepo -DestinationLocation \\storage\Share -AsReplicationSeed

Get-SvnAccessConfiguration

Available since VisualSVN Server 5.0.

Returns the per-repository authorization settings, such as the value of the implicit list folder permission for parents of readable paths option.

It is possible to retrieve settings configured for the different authorization profile or for the inactive authentication mode by using the AuthorizationProfile parameter. If the AuthorizationProfile parameter is not specified, this cmdlet retrieves the settings configured for the currently active authorization profile.

Example 1: Retrieve the per-repository authorization settings for all repositories

Get-SvnAccessConfiguration

Example 2: Retrieve the per-repository authorization settings for the MyRepo repository

Get-SvnAccessConfiguration MyRepo

Example 3: Retrieve the per-repository authorization settings for a specific profile

Get-SvnAccessConfiguration -Repository MyRepo -AuthorizationProfile SubversionLocal

Example 4: Retrieve all repositories in which the Implicit list folder permission setting is disabled

Get-SvnAccessConfiguration | Where-Object -Property ImplicitListFolderAccess -EQ Disabled

Get-SvnAccessRule

Available since VisualSVN Server 3.4.

Retrieves a list of the access rules configured in VisualSVN Server. Retrieved access rules can be filtered by repository, repository path, account name (or a stable identifier, such as Windows SID) and access level. These filters may be applied separately or together in any combination.

VisualSVN Server may be configured to use either Windows or Subversion authentication. Each mode has its own set of access rules. By default, all access rule cmdlets work with the access rules from the currently active authentication mode. To work with the access rules from an inactive authentication mode, for example, to edit Subversion access rules when the server is using Windows authentication, please pass the appropriate AuthorizationProfile parameter. See the examples below.

For VDFS repositories, it is possible to retrieve the access rules configured for the Shared and Local authorization profiles using the AuthorizationProfile parameter. If the AuthorizationProfile parameter is not specified, this cmdlet retrieves the access rules configured for the currently active authorization profile.

Example 1: Retrieve the full list of access rules configured for a VisualSVN Server instance

Get-SvnAccessRule

Example 2: Retrieve a list of global access rules

Get-SvnAccessRule -Global

Example 3: Retrieve a list of access rules filtered for the MyRepo repository

Get-SvnAccessRule MyRepo

Example 4: Retrieve a list of access rules for all the trunk paths (in all repositories)

Get-SvnAccessRule -Path */trunk

Example 5: Retrieve a list of access rules filtered for the Devs user group

Get-SvnAccessRule -AccountName contoso\Devs

Example 6: Retrieve a list of access rules filtered for the BUILTIN\Users Windows account using its SID string

Get-SvnAccessRule -AccountId S-1-5-32-545

Example 7: Retrieve a list of all read/write access rules

Get-SvnAccessRule -Access ReadWrite

Example 8: Retrieve a list of all access rules and export it to a CSV file

Get-SvnAccessRule | Select Repository, Path, AccountName, Access | Export-Csv -NoTypeInformation AccessReport.csv

Example 9: Retrieve a list of access rules in the Local authorization profile of a VDFS repository

Get-SvnAccessRule MyVdfsRepo -AuthorizationProfile WindowsLocal

Example 10: Retrieve a list of Subversion access rules filtered for the MyRepo repository

Get-SvnAccessRule -AuthorizationProfile SubversionLocal -Repository MyRepo

Example 11: Retrieve a list of global Subversion access rules

Get-SvnAccessRule -AuthorizationProfile SubversionLocal -Global

Get-SvnEffectiveAccess

Available since VisualSVN Server 5.2.

Returns the effective access permissions that a user has to the specified path.

Tip
Effective access permissions are the resultant access permissions that a specified user has to a specified path, based on the combined effect of all the applicable access rules.

VisualSVN Server may be configured to use either Windows or Subversion authentication. Each mode has its own set of access rules. By default, this cmdlet returns the effective access for the currently active authentication mode. To retrieve effective access for an inactive authentication mode, for example, for Subversion authentication when the server is using Windows authentication, please pass the appropriate AuthorizationProfile parameter.

Example 1: Retrieve effective access that a user has to a path within the repository

Get-SvnEffectiveAccess -AccountName contoso\Jack -Repository MyRepo -Path /trunk

Example 2: Retrieve effective access permissions that a user has to items in the repository

Get-SvnRepositoryItem -Repository MyRepo -Path /trunk | Get-SvnEffectiveAccess -AccountName contoso\Jack

Example 3: Generate an effective access report for the user

Get-SvnAccessRule | `
    Select-Object -Unique -Property Repository, Path | `
    foreach { Get-SvnEffectiveAccess -Repository $_.Repository -Path $_.Path -AccountName contoso\Jack }

Get-SvnJob

Available since VisualSVN Server 3.6.

Retrieves a list of configured background jobs. Retrieved jobs can be filtered by their type, state, description and last run result.

Example 1: Retrieve the full list of background jobs configured for a VisualSVN Server instance

Get-SvnJob

Example 2: Retrieve a list of configured backup jobs

Get-SvnJob -Type Backup

Example 3: Get extended information about the configured background jobs

Get-SvnJob | Format-List

Get-SvnLocalGroup

Available since VisualSVN Server 4.2.

Retrieves a list of local Subversion security groups configured in VisualSVN Server.

Example 1: Retrieve the full list of local groups configured for a VisualSVN Server instance

Get-SvnLocalGroup

Example 2: Retrieve an object for the specific local group 'users'

Get-SvnLocalGroup users

Get-SvnLocalGroupMember

Available since VisualSVN Server 4.2.

Retrieves a list of members from a local Subversion security group.

Example 1: Retrieve the list of members from a local group 'users'

Get-SvnLocalGroupMember users

Example 2: Retrieve the list of all local groups and their members

Get-SvnLocalGroup | foreach { [pscustomobject] @{Group = $_.Name; Members = ($_ | Get-SvnLocalGroupMember)} }

Get-SvnLocalUser

Available since VisualSVN Server 4.2.

Retrieves a list of local Subversion user accounts.

Example 1: Retrieve the full list of local users configured for a VisualSVN Server instance

Get-SvnLocalUser

Example 2: Retrieve an object for the specific local user 'jack'

Get-SvnLocalUser jack

Get-SvnRepository

Available since VisualSVN Server 3.4.

Retrieves a list of Subversion repositories. Retrieved repositories can be filtered by name and type. The Get-SvnRepository cmdlet can also be used to obtain such technical details of a repository as its UUID, internal data format, information about FSFS shards, etc.

Example 1: Retrieve the full list of repositories hosted in a VisualSVN Server instance

Get-SvnRepository

Example 2: Retrieve a list of slave VDFS repositories

Get-SvnRepository -Type VdfsSlave

Example 3: Retrieve all repositories whose names start with ‘My’

Get-SvnRepository My*

Example 4: Display technical details for the MyRepo repository

Get-SvnRepository MyRepo | Format-List

Get-SvnRepositoryBackup

Available since VisualSVN Server 5.4.

Retrieves the list of repository backups (with details about them) based on the provided parameter, such as all the backups created by a particular backup job. The returned list of backups can be used as input for the Test-SvnRepositoryBackup command.

When used with the -BackupPath parameter, the cmdlet also supports the -EncryptionPassword parameter to read encrypted backup files, and the -Credential parameter to provide custom credentials for accessing the backup files. Note that using these latter two optional parameters requires PowerShell 4.0 or later to be installed on the machine.

Example 1: Get the list of all backups created by a particular backup job

Get-SvnRepositoryBackup -JobName MyJob

Example 2: Get details about the specified backup file

Get-SvnRepositoryBackup -BackupPath "D:\Backups\MyRepo-2024-05-26-113000-full.vsvnbak"

Example 3: Get details about the specified remotely stored backup file, using custom credentials to access the file

Get-SvnRepositoryBackup -BackupPath "\\share\MyRepo-2024-05-26-113000-full.vsvnbak" -Credential (Get-Credential)

Get-SvnRepositoryHook

Available since VisualSVN Server 3.5.

Retrieves a list of the repository hooks configured in VisualSVN Server. Retrieved repository hooks can be filtered by repository, hook type and by the actual content of the hook. The content of the hooks can be filtered using the common wildcard characters. These filters may be applied separately or together in any combination.

Example 1: Retrieve the full list of repository hooks configured for a VisualSVN Server instance

Get-SvnRepositoryHook

Example 2: Retrieve a list of repository hooks filtered for the MyRepo repository

Get-SvnRepositoryHook MyRepo

Example 3: Display the full content of the pre-revprop-change hook for the MyRepo repository

Get-SvnRepositoryHook MyRepo -Type PreRevpropChange | Format-List

Example 4: Retrieve a list of all the post-commit hooks configured for a VisualSVN Server instance

Get-SvnRepositoryHook -Type PostCommit

Example 5: Retrieve a list of all the pre-revprop-change hooks that contain the 'exit 0' substring

Get-SvnRepositoryHook -Type PreRevpropChange -Content '*exit 0*'

Get-SvnRepositoryItem

Available since VisualSVN Server 3.4.

Retrieves a list of files and folders for the specified path in a Subversion repository.

Example 1: Retrieve a list of files and folders in the /trunk folder of the MyRepo repository

Get-SvnRepositoryItem MyRepo /trunk

Example 2: Retrieve a list of all *.cpp files in the /trunk folder of the MyRepo repository

Get-SvnRepositoryItem MyRepo /trunk -Filter *.cpp

Example 3: Retrieve a list of all folders in the /trunk folder of the MyRepo repository

Get-SvnRepositoryItem MyRepo /trunk -Type Folder

Get-SvnRepositoryItemLock

Available since VisualSVN Server 5.1.

Retrieves the list of locked files in a Subversion repository.

Example 1: Retrieve all locks in the MyRepo repository

Get-SvnRepositoryItemLock MyRepo

Example 2: Retrieve locks within /trunk in the MyRepo repository

Get-SvnRepositoryItemLock -Repository MyRepo -Path /trunk/*

Example 3: Retrieve details about the lock on /trunk/MyPicture.png in the MyRepo repository

Get-SvnRepositoryItemLock -Repository MyRepo -Path /trunk/MyPicture.png | Format-Table

Get-SvnServerConfiguration

Available since VisualSVN Server 3.5.

Returns the configuration settings of a VisualSVN Server instance.

Example 1: Get the current VisualSVN Server configuration settings

Get-SvnServerConfiguration

Example 2: Backup the current VisualSVN Server settings to a 'config-backup.xml' file

Get-SvnServerConfiguration | Export-Clixml config-backup.xml

Get-SvnServerLicense

Available since VisualSVN Server 4.0.

Returns details about the license installed on a VisualSVN Server instance.

Example 1: Get details about the license installed on the local VisualSVN Server instance

Get-SvnServerLicense

Import-SvnRepository

Available since VisualSVN Server 3.4.

Imports a repository or a repository dump from the specified path. The name of the imported repository can be changed using the DestinationName parameter.

Example 1: Import the Repo1 repository from a network share with the Repo2 destination name

Import-SvnRepository \\storage\Share\Repo1 -DestinationName Repo2

Example 2: Import a repository from the MyRepo.dmp dump file taking the name of the dump file as the name for the new repository

Import-SvnRepository \\storage\Share\MyRepo.dmp

Example 3: Import multiple repositories from *.dmp dump files located in the C:\RepoDumps\ directory

Get-Item "C:\RepoDumps\*.dmp" | Import-SvnRepository

Invoke-SvnJob

Available since VisualSVN Server 4.0.

Runs the specified background job and waits until it completes. Compared to Start-SvnJob, this cmdlet executes synchronously: it starts the specified job and only returns after the job has completed.

Example 1: Invoke the background job MyJob

Invoke-SvnJob MyJob

Measure-SvnRepository

Available since VisualSVN Server 3.4.

Measures the disk space and other statistics related to the Subversion repositories. This cmdlet can measure disk space, search index size and the number of uncommitted repository transactions for one or multiple repositories.

Use Format-List to display extended size information, such as the number of uncommitted repository transactions.

Use -Stats option to specify the subset of measured values. Available since VisualSVN Server 5.0.

Example 1: Measure the disk space for each repository hosted in a VisualSVN Server instance

Measure-SvnRepository

Example 2: Measure the disk space occupied by the MyRepo repository

Measure-SvnRepository MyRepo

Example 3: Measure the disk space for all repositories whose names start with ‘My’

Measure-SvnRepository My*

Example 4: Measure and display extended size information for a repository

Measure-SvnRepository MyRepo | Format-List

Example 5: Measure only the search index size for a repository

Measure-SvnRepository MyRepo -Stats SearchIndexSize

New-SvnLocalGroup

Available since VisualSVN Server 4.2.

Creates a local Subversion security group. The created group will be empty. New members can be added to the group using the Add-SvnLocalGroupMember cmdlet.

Example 1: Create the local group 'users'

New-SvnLocalGroup users

New-SvnLocalUser

Available since VisualSVN Server 4.2.

Creates a local Subversion user account.

Example 1: Create the local user 'jack'

$password = Read-Host -AsSecureString
********************
New-SvnLocalUser -Name jack -Password $password

New-SvnReplicationAuthentication

Available since VisualSVN Server 3.7.

Creates a PowerShell object with the authentication settings for VDFS replication. This cmdlet can be used to specify the initial authentication settings for replication when creating VDFS slave repositories with the New-SvnRepository cmdlet or to change the existing authentication settings with the Set-SvnRepository cmdlet.

Example 1: Create a new settings object for Active Directory authentication

New-SvnReplicationAuthentication -Type ActiveDirectory

Example 2: Create a new settings object for certificate-based authentication with mutual authentication

New-SvnReplicationAuthentication -Type Certificate -MutualAuthentication $True

New-SvnRepository

Available since VisualSVN Server 3.4.

Creates a new Subversion repository. This cmdlet can be used to create both regular and distributed VDFS repositories.

Example 1: Create a new FSFS repository named PlainRepo

New-SvnRepository PlainRepo

Example 2: Create a new master VDFS repository named MyRepo

New-SvnRepository MyRepo -Type VdfsMaster

Example 3: Create a new MyRepo slave VDFS repository and connect it to the co-named master repository on the berlin-svn server

New-SvnRepository MyRepo -Type VdfsSlave -MasterServer berlin-svn

Example 4: Create a new MyRepo slave VDFS repository and connect it to the TheirRepo master repository on the berlin-svn server

New-SvnRepository MyRepo -Type VdfsSlave -MasterServer berlin-svn -MasterRepository TheirRepo

Example 5: Create a new MyRepo slave VDFS repository using certificate-based authentication for replication

$auth = New-SvnReplicationAuthentication -Type Certificate -MutualAuthentication $True
New-SvnRepository MyRepo -Type VdfsSlave -MasterServer berlin-svn -MasterRepository TheirRepo -ReplicationAuthentication $auth

New-SvnRepositoryItem

Available since VisualSVN Server 3.4.

Creates a folder in a Subversion repository. This cmdlet can create multiple folders in a single transaction. Creating files is currently not supported.

Example 1: Create a MyProject folder in the MyRepo repository with a custom log message

New-SvnRepositoryItem MyRepo -Path /MyProject -Type Folder -CommitMessage "Custom message."

Example 2: Create branches, tags and trunk folders in the MyRepo repository

New-SvnRepositoryItem MyRepo -Path /branches, /tags, /trunk -Type Folder

New-SvnServerCertificateRequest

Available since VisualSVN Server 4.0.

Generates a Certificate Signing Request (CSR) to be sent to a Certificate Authority. Such requests are used to obtain signed SSL certificates.

If the DnsName parameter is omitted, the DNS names in the request will be automatically determined based on the Server Name and the currently configured SSL certificate. This is usually convenient in a case where you would like to renew an existing SSL certificate on the server.

To generate a new private key for the new certificate, pass the NewKeyPair switch. If necessary, the bit length of the new private key can be customized using the KeyLength parameter.

Tip
The NewKeyPair switch is available since VisualSVN Server 5.1, and the KeyLength parameter is available since VisualSVN Server 5.2.

Example 1: Automatically generate a Certificate Signing Request

New-SvnServerCertificateRequest

Example 2: Generate a Certificate Signing Request for the specified DNS names

New-SvnServerCertificateRequest -DnsName a.contoso.com, b.contoso.com

Example 3: Generate a Certificate Signing Request based on a new 4096 bit private key

New-SvnServerCertificateRequest -NewKeyPair -KeyLength 4096

Remove-SvnAccessRule

Available since VisualSVN Server 3.4.

Deletes one or more rules that control access to Subversion repositories.

VisualSVN Server may be configured to use either Windows or Subversion authentication. Each mode has its own set of access rules. By default, all access rule cmdlets work with the access rules from the currently active authentication mode. To work with the access rules from an inactive authentication mode, for example, to edit Subversion access rules when the server is using Windows authentication, please pass the appropriate AuthorizationProfile parameter. See the examples below.

Example 1: Delete access rule for the Devs user group from the trunk folder in the MyRepo repository

Remove-SvnAccessRule MyRepo -Path /trunk -AccountName contoso\Devs

Example 2: Delete access rules for the Devs user group for all paths in the MyRepo repository

Remove-SvnAccessRule MyRepo -AccountName contoso\Devs

Example 3: Delete global access rule for the Devs user group

Remove-SvnAccessRule -Global -AccountName contoso\Devs

Example 4: Delete global access rule for the BUILTIN\Users Windows account using its SID string

Remove-SvnAccessRule -Global -AccountId S-1-5-32-545

Example 5: Delete access rule for the local Subversion account 'jack'

Remove-SvnAccessRule -AuthorizationProfile SubversionLocal -Repository MyRepo -Path /trunk -AccountName jack

Remove-SvnLocalGroup

Available since VisualSVN Server 4.2.

Deletes a local Subversion security group.

Example 1: Delete local group 'users'

Remove-SvnLocalGroup users

Remove-SvnLocalGroupMember

Available since VisualSVN Server 4.2.

Removes members from a local Subversion security group.

Example 1: Remove user 'jack' from group 'users'

Remove-SvnLocalGroupMember users (Get-SvnLocalUser jack)

Example 2: Remove group 'users' from group 'admins'

Remove-SvnLocalGroupMember admins (Get-SvnLocalGroup users)

Example 3: Remove all members of group 'users'

Remove-SvnLocalGroupMember users (Get-SvnLocalGroupMember users)

Remove-SvnLocalUser

Available since VisualSVN Server 4.2.

Deletes a local Subversion user account.

Example 1: Delete local user 'jack'

Remove-SvnLocalUser jack

Remove-SvnRepository

Available since VisualSVN Server 3.4.

Deletes a Subversion repository.

Warning
This operation is irreversible and should be performed with caution.

Example 1: Delete the MyRepo repository

Remove-SvnRepository MyRepo

Remove-SvnRepositoryHook

Available since VisualSVN Server 3.5.

Deletes one or more repository hooks. Repository hooks to be deleted can be filtered by repository and hook type.

Example 1: Delete post-commit repository hook for the MyRepo repository

Remove-SvnRepositoryHook MyRepo -Type PostCommit

Example 2: Delete all the repository hooks configured for the MyRepo repository

Remove-SvnRepositoryHook MyRepo

Example 3: Delete all the post-commit hooks configured for slave VDFS repositories

Get-SvnRepository -Type VdfsSlave | Get-SvnRepositoryHook -Type PostCommit | Remove-SvnRepositoryHook

Remove-SvnRepositoryItem

Available since VisualSVN Server 3.4.

Deletes a file or a folder in a Subversion repository. This cmdlet can delete multiple items in a single transaction.

Example 1: Delete the readme.txt file in the root of the MyRepo repository with a custom log message

Remove-SvnRepositoryItem MyRepo -Path /readme.txt -CommitMessage "Custom message."

Example 2: Delete the branches and tags folders from the MyRepo repository

Remove-SvnRepositoryItem MyRepo -Path /readme.txt -CommitMessage "Custom message."

Remove-SvnRepositoryItemLock

Available since VisualSVN Server 5.1.

Removes the locks from the specified files in a Subversion repository.

Example 1: Remove all locks in the MyRepo repository

Remove-SvnRepositoryItemLock -Repository MyRepo -Path *

Example 2: Remove locks within /trunk in the MyRepo repository

Remove-SvnRepositoryItemLock -Repository MyRepo -Path /trunk/*

Example 3: Remove lock on /trunk/MyPicture.png in the MyRepo repository

Remove-SvnRepositoryItemLock -Repository MyRepo -Path /trunk/MyPicture.png

Rename-SvnRepository

Available since VisualSVN Server 3.4.

Renames a Subversion repository.

Example 1: Rename the MyRepo repository to NewRepo

Rename-SvnRepository MyRepo -NewName NewRepo

Restore-SvnRepository

Available since VisualSVN Server 3.6.

Restores a Subversion repository from backup.

Starting from VisualSVN Server 3.8, this cmdlet supports using the ‑EncryptionPassword parameter to restore encrypted backups, and supplying custom credentials when restoring from remote destinations with the ‑Credential parameter. Note that using these parameters requires PowerShell 4.0 or later to be installed on the machine.

Example 1: Restore the MyRepo repository from the backup file

Restore-SvnRepository \\storage\Share\MyRepo-2017-03-20-175205-full.vsvnbak

Example 2: Restore the repository from the backup file as "NewRepo"

Restore-SvnRepository \\storage\Share\MyRepo-2017-03-20-175205-full.vsvnbak -NewName NewRepo

Example 3: Restore the MyRepo repository from the encrypted backup file

$password = Read-Host -AsSecureString
********************
Restore-SvnRepository \\storage\Share\MyRepo-2017-03-20-175205-full.vsvnbak -EncryptionPassword $password

Example 4: Restore the MyRepo repository from the remote destination using custom credentials

Restore-SvnRepository \\storage\Share\MyRepo-2017-03-20-175205-full.vsvnbak -Credential (Get-Credential)

Resume-SvnRepository

Available since VisualSVN Server 3.4.

Resumes a suspended (read-only) VDFS repository. A VDFS repository can be suspended for maintenance or disaster recovery reasons. Suspended VDFS repositories do not accept commits and other repository data modifications. Suspended slave VDFS repositories do not replicate changes from master repositories.

Example 1: Resume a suspended MyRepo repository

Resume-SvnRepository MyRepo

Select-SvnAccessRule

Available since VisualSVN Server 3.4.

Returns a list of access rules that apply for the specified path in a Subversion repository. This list of access rules corresponds to the content of the Security tab in VisualSVN Server Manager.

The result of Select-SvnAccessRule cmdlet differs from the results of Get-SvnAccessRule cmdlet executed for a particular path in repository in the following ways:

  • the result of Select-SvnAccessRule includes access rules from all the parent paths,
  • in the same time, overridden access rules are filtered out from the results of Select-SvnAccessRule.

VisualSVN Server may be configured to use either Windows or Subversion authentication. Each mode has its own set of access rules. By default, all access rule cmdlets work with the access rules from the currently active authentication mode. To work with the access rules from an inactive authentication mode, for example, to edit Subversion access rules when the server is using Windows authentication, please pass the appropriate AuthorizationProfile parameter. See the examples below.

For information about access rules in Subversion, please read the KB33: Understanding VisualSVN Server authorization article.

Example 1: Display a list of access rules that apply for the trunk folder in the MyRepo repository

Select-SvnAccessRule MyRepo -Path /trunk

Example 2: Display a list of Subversion access rules that apply for the trunk folder in the MyRepo repository

Select-SvnAccessRule -AuthorizationProfile SubversionLocal -Repository MyRepo -Path /trunk

Set-SvnAccessConfiguration

Available since VisualSVN Server 5.0.

Modifies the per-repository authorization settings, such as the value of the implicit list folder permission for parents of readable paths option.

It is possible to modify settings configured for the different authorization profile or for the inactive authentication mode by using the AuthorizationProfile parameter. If the AuthorizationProfile parameter is not specified, this cmdlet retrieves the settings configured for the currently active authorization profile.

Example 1: Change the Implicit list folder permission setting for a repository

Set-SvnAccessConfiguration -Repository MyRepo -ImplicitListFolderAccess Enabled

Example 2: Change the Implicit list folder permission setting for all repositories

Get-SvnAccessConfiguration | Set-SvnAccessConfiguration -ImplicitListFolderAccess Enabled

Example 3: Change the Implicit list folder permission for a specific profile

Set-SvnAccessConfiguration -Repository MyRepo -AuthorizationProfile SubversionLocal -ImplicitListFolderAccess Enabled

Set-SvnAccessRule

Available since VisualSVN Server 3.4.

Modifies an existing access rule that controls access to Subversion repositories.

VisualSVN Server may be configured to use either Windows or Subversion authentication. Each mode has its own set of access rules. By default, all access rule cmdlets work with the access rules from the currently active authentication mode. To work with the access rules from an inactive authentication mode, for example, to edit Subversion access rules when the server is using Windows authentication, please pass the appropriate AuthorizationProfile parameter. See the examples below.

Example 1: Change access level to ReadOnly for the Devs user group for the tags folder in the MyRepo repository

Set-SvnAccessRule MyRepo -Path /trunk -AccountName contoso\Devs -Access ReadOnly

Example 2: Change global access level to NoAccess for the Jack user

Set-SvnAccessRule -Global -AccountName contoso\Jack -Access NoAccess

Example 3: Change level of all access rule configured for the Jack user to NoAccess

Get-SvnAccessRule -AccountName contoso\Jack | Set-SvnAccessRule -Access NoAccess

Example 4: Change level of Subversion repository access rule configured for group 'admins' to NoAccess

Get-SvnAccessRule -AuthorizationProfile SubversionLocal -Repository MyRepo -AccountName admins | Set-SvnAccessRule -Access NoAccess

Set-SvnLocalUser

Available since VisualSVN Server 4.2.

Modifies properties of an existing local Subversion user account.

Example 1: Change password for existing user 'jack'

$password = Read-Host -AsSecureString
********************
Set-SvnLocalUser -Name jack -Password $password

Set-SvnRepository

Available since VisualSVN Server 3.4.

Modifies settings for a Subversion repository.

Example 1: Change the name of the master VDFS repository to NewMaster for the MyRepo slave VDFS repository

Set-SvnRepository MyRepo -MasterRepository NewMaster

Example 2: Change the name of master server to berlin-svn-new for the MyRepo slave VDFS repository

Set-SvnRepository MyRepo -MasterServer berlin-svn-new

Example 3: Change the active authorization profile to Local for the MyRepo VDFS repository

Set-SvnRepository MyRepo -ActiveAuthorizationProfile Local

Example 4: Reconfigure the MyRepo slave VDFS repository to use certificate-based authentication for replication

$auth = New-SvnReplicationAuthentication -Type Certificate -MutualAuthentication $True
Set-SvnRepository MyRepo -ReplicationAuthentication $auth

Example 5: Disable replication of the MyRepo master VDFS repository

Set-SvnRepository MyRepo -ReplicationEnabled $false

Example 6: Set the list of servers authenticated by Active Directory that can replicate data from the MyRepo repository

Set-SvnRepository MyRepo -ReplicatorsAuthenticatedByActiveDirectory contoso\ny-svn$, contoso\rome-svn$
Tip
The ‘$’ symbol is added to the ny-svn and rome-svn server names in order to specify access for the computer accounts, because the VDFS service runs under the NetworkService account that acts as the computer on the network. For further details please consider the Active Directory naming article on the MSDN.

Example 7: Set the list of servers authenticated by Replication Certificate that can replicate data from the MyRepo repository

Set-SvnRepository MyRepo -ReplicatorsAuthenticatedByCertificate ny-svn.contoso.com, rome-svn.contoso.com

Example 8: Enable repository management delegation and set the list of supervisors allowed to manage the MyRepo repository

Set-SvnRepository MyRepo -DelegationEnabled $true -DelegationSupervisors contoso\Bob, contoso\Jack

Set-SvnRepositoryHook

Available since VisualSVN Server 3.5.

Modifies the content of existing repository hooks.

Example 1: Set the content of the pre-revprop-change hook for the MyRepo repository to 'exit 0'

Set-SvnRepositoryHook MyRepo -Type PreRevpropChange -Content 'exit 0'

Example 2: Set the content of all existing pre-revprop-change hooks for slave VDFS repositories to 'exit 1'

Get-SvnRepository -Type VdfsSlave | Get-SvnRepositoryHook -Type PreRevpropChange | Set-SvnRepositoryHook -Content 'exit 1'

Example 3: Set the content of the post-commit hook for the MyRepo repository to the multiline text (just press Enter after each line)

Set-SvnRepositoryHook MyRepo -Type PostCommit -Content 'rem first line
>> rem second line
>> exit 0
>> '

Set-SvnServerConfiguration

Available since VisualSVN Server 3.5.

Modifies the VisualSVN Server configuration settings.

The following settings can be modified:

  • ServerName

    Fully qualified domain name of the server ('svn.contoso.com' for example). To return to default fully qualified name for your server set the ServerName to an empty string.

  • ServerCertificate Since VisualSVN Server 4.0

    The SSL certificate used by the server for HTTPS connections. The certificate is represented by an X509Certificate2 object. Note that the new certificate must match the private key installed on the server.

  • ServerCertificatePfx Since VisualSVN Server 5.4

    This parameter lets you change the SSL certificate and private key that are used for HTTPS connections. The parameter accepts raw data as a byte array. The data should be in the PFX (PKCS #12) format. The data should be unencrypted and should contain either a new certificate with its matching private key or just a new certificate. If just a new certificate is provided, it must match the private key installed on the server.

  • RepositoriesRoot

    The path where repositories are stored on the disk (C:\Repositories\ is the default).

  • RepositoriesURLPrefix

    An URL prefix that is used to access the repositories. For example, a MyRepo repository will be available at https://svn.contoso.com/svn/MyRepo URL if RepositoriesURLPrefix is set to /svn.

  • ListenPort

    The port the server is listening to (443 is the default).

  • ListeningIPAddress

    The list of IP addresses that the server binds to (for usage patterns see the examples below).

  • EnableSSL

    Enables HTTPS also known as HTTP over SSL ($True by default).

  • SSLCompatibilityLevel Since VisualSVN Server 3.6

    The currently selected TLS/SSL compatibility level (Intermediate by default).

  • RedirectToHTTPS Since VisualSVN Server 3.6

    Enables automatic redirection from HTTP to HTTPS for the clients ($False by default).

  • EnableHTTPCompression Since VisualSVN Server 3.7

    Enables dynamic HTTP compression on the server ($True by default).

  • AuthenticationMode

    Supported authentication modes are Subversion and Windows.

  • EnableBasicAuthentication

    Enables Basic Windows Authentication method.

  • EnableIntegratedAuthentication

    Enables Integrated Windows Authentication method.

  • EnableSelfPasswordChange Since VisualSVN Server 4.0

    Enables self-service password changing for Subversion authentication.

  • EnableOperationalLogging

    Enables Operational Logging.

  • EnableAccessLogging

    Enables Access Logging.

  • SvnInMemoryCacheSize Since VisualSVN Server 3.6

    The size of Subversion memory object cache.

  • ReplicationAuthenticationTypes Since VisualSVN Server 3.7

    The VDFS replication authentication types enabled on the server. Allowed values are either ActiveDirectory or ActiveDirectory, Certificate. Note that the Active Directory authentication is always enabled and cannot be disabled using this setting. The default value is ActiveDirectory.

  • ReplicatorsAuthenticatedByActiveDirectory Since VisualSVN Server 3.7

    List of the replication partners authenticated by Active Directory that are authorized to connect to this server as a slave.

  • ReplicatorsAuthenticatedByCertificate Since VisualSVN Server 3.7

    List of the replication partners authenticated by Replication Certificate that are authorized to connect to this server as a slave.

  • ReplicationCertificateThumbprint Since VisualSVN Server 3.7

    The thumbprint of the Replication Certificate used by the server.

  • DefaultBackupDirectory Since VisualSVN Server 3.6

    The path to the default location for new backups (C:\Users\Public\Documents\VisualSVN Server\Backup\ is the default).

  • RepositorySupervisors Since VisualSVN Server 4.1

    The list of users allowed to connect to this server using VisualSVN Repository Configurator.

  • AdminNotifications Since VisualSVN Server 5.0

    Enables or disables administrative email notifications on the server. Supported values are Enabled and Disabled.

  • AdminNotificationsSmtpProfile Since VisualSVN Server 5.0

    Specifies the name of the outgoing email profile used for administrative email notifications.

  • AdminNotificationsEmailAddress Since VisualSVN Server 5.0

    Specifies the default email address for all administrative email notifications.

  • SearchIndexing Since VisualSVN Server 5.0

    Enables or disables search indexing for the repositories on the server. Supported values are Enabled and Disabled.

  • SearchIndexDirectory Since VisualSVN Server 5.0

    Specifies the location of the search index folder.

  • DefaultImplicitListFolderAccess Since VisualSVN Server 5.0

    Changes the default implicit list folder permission for parents of readable paths setting for new repositories. Supported values are Enabled and Disabled.

  • WebUIRedirectFromLegacyVersion

    Enables automatic redirection from the legacy web interface. Supported values are Enabled and Disabled. Before VisualSVN Server 5.1 this setting was named RedirectFromLegacyWebInterface.

  • WebUIUserProblemReporting Since VisualSVN Server 4.0

    Enables the 'Report a problem' link in the web interface. Supported values are Enabled and Disabled. Before VisualSVN Server 5.1 this setting was named EnableUserProblemReporting.

  • WebUIRepositoryModify Since VisualSVN Server 5.1

    Enables modifying repositories using the web interface. Supported values are Enabled and Disabled.

  • PasswordGuessingProtection Since VisualSVN Server 5.2

    Enables password guessing attack protection. Supported values are Enabled and Disabled.

  • PasswordGuessingProtectionBanThreshold Since VisualSVN Server 5.2

    Configures the failed authentication threshold option of the password guessing attack protection.

  • PasswordGuessingProtectionBanTime Since VisualSVN Server 5.2

    Configures the blocking duration option of the password guessing attack protection. The value is represented as a TimeSpan.

  • PasswordGuessingProtectionResetTime Since VisualSVN Server 5.2

    Configures the reset time option of the password guessing attack protection. The value is represented as a TimeSpan.

Example 1: Change the server port to '8443'

Set-SvnServerConfiguration -ListenPort 8443

Example 2: Restore the VisualSVN Server settings from a 'config-backup.xml' file

Import-Clixml config-backup.xml | Set-SvnServerConfiguration

Example 3: Bind server to all available IP addresses

Set-SvnServerConfiguration -ListeningIPAddress All

Example 4: Bind server to the '127.0.0.1' and '::1' IP addresses

Set-SvnServerConfiguration -ListeningIPAddress "127.0.0.1", "::1"

Example 5: Switch server to Windows authentication mode with both Basic and Integrated authentication method enabled

Set-SvnServerConfiguration -AuthenticationMode Windows -EnableBasicAuthentication $True -EnableIntegratedAuthentication $True

Example 6: Configure VisualSVN Server to use the Modern TLS/SSL compatibility level

Set-SvnServerConfiguration -SSLCompatibilityLevel Modern

Example 7: Enable the certificate-based authentication for replication using the specified certificate

Set-SvnServerConfiguration -ReplicationAuthenticationTypes ActiveDirectory, Certificate -ReplicationCertificateThumbprint '3563c93294e1d74d9ffd469818c83f4e15357c3e'

Example 8: Set the list of authorized replication partners authenticated by Active Directory

Set-SvnServerConfiguration -ReplicatorsAuthenticatedByActiveDirectory contoso\ny-svn$, contoso\rome-svn$

Example 9: Set the list of authorized replication partners authenticated by Replication Certificate

Set-SvnServerConfiguration -ReplicatorsAuthenticatedByCertificate ny-svn.contoso.com, rome-svn.contoso.com

Example 10: Configure the server to use the SSL certificate from the specified file

$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\server.cer")
Set-SvnServerConfiguration -ServerCertificate $cert

Example 11: Set the list of supervisors allowed to connect to this server using VisualSVN Repository Configurator

Set-SvnServerConfiguration -RepositorySupervisors contoso\Bob, contoso\Jack

Example 12: Enable the search indexing on the server with the specified index directory

Set-SvnServerConfiguration -SearchIndexing Enabled -SearchIndexDirectory D:\Index

Example 13: Change the default implicit list folder permission setting for new repositories

Set-SvnServerConfiguration -DefaultImplicitListFolderAccess Enabled

Example 14: Enable and configure password guessing attack protection

Set-SvnServerConfiguration `
    -PasswordGuessingProtection Enabled `
    -PasswordGuessingProtectionBanThreshold 10 `
    -PasswordGuessingProtectionBanTime (New-TimeSpan -Minutes 4) `
    -PasswordGuessingProtectionResetTime (New-TimeSpan -Minutes 4)

Example 15: Import an SSL certificate with its private key from a password-protected PFX file

$password = Read-Host -Prompt "Enter password" -AsSecureString
Enter password: ********************
$certData = Get-PfxData "C:\Users\Administrator\SSL_certificates\server.pfx" -Password $password
Set-SvnServerConfiguration -ServerCertificatePfx $certData.EndEntityCertificates.Export("Pfx")

Set-SvnServerLicense

Available since VisualSVN Server 4.0.

Updates the license on a VisualSVN Server instance.

Example 1: Update the paid license on the server

Set-SvnServerLicense -LicenseKey S08sg8ar4sg8fm6r8l...

Example 2: Replace the current license on the server with a Community license

Set-SvnServerLicense -Community

Start-SvnJob

Available since VisualSVN Server 3.6.

Starts a background job. Compared to Invoke-SvnJob, this cmdlet executes asynchronously: it starts the specified job and returns immediately, without waiting for the job to complete.

Example 1: Start the background job MyJob

Start-SvnJob MyJob

Stop-SvnJob

Available since VisualSVN Server 3.6.

Stops a background job.

Example 1: Stop the background job MyJob

Stop-SvnJob MyJob

Suspend-SvnRepository

Available since VisualSVN Server 3.4.

Makes a VDFS repository read-only temporarily. A VDFS repository can be suspended for maintenance or disaster recovery reasons. Suspended VDFS repositories do not accept commits and other repository data modifications. Suspended slave VDFS repositories do not replicate changes from master repositories.

Example 1: Suspend the MyRepo VDFS repository

Suspend-SvnRepository MyRepo

Example 2: Suspend all the master VDFS repositories on the current server

Get-SvnRepository -Type VdfsMaster | Suspend-SvnRepository

Switch-SvnRepository

Available since VisualSVN Server 3.4.

Switches replication role for a VDFS repository.

Note
This operation is mostly required for disaster recovery needs and should be used with caution. VDFS repositories can become out of sync if this cmdlet is used improperly. Check the KB93: Performing disaster recovery for distributed VDFS repositories article for further details.

Example 1: Switch replication role of the MyRepo repository to ‘master’

Switch-SvnRepository MyRepo -Role Master

Example 2: Switch replication role of the MyRepo repository to ‘slave’ providing connection details to the TheirRepo master repository on the berlin-svn server

Switch-SvnRepository MyRepo -Role Slave -MasterServer berlin-svn -MasterRepository TheirRepo

Sync-SvnRepository

Available since VisualSVN Server 3.4.

Forces a slave VDFS repository to replicate data from the master repository.

This cmdlet is useful to detect VDFS configuration problems, because it displays error messages if the replication fails. Moreover, Sync-SvnRepository cmdlet is very important for disaster recovery needs, because it guarantees that the slave will be fully up-to-date in case the master repository is suspended.

Example 1: Force the MyRepo slave VDFS repository to replicate data from the master repository

Sync-SvnRepository MyRepo -PassThru

Note that the -PassThru parameter is optional and can be used to display the youngest revision in the slave repository after synchronization.

Test-SvnRepository

Available since VisualSVN Server 3.4.

Executes the specified integrity and consistency checks for a Subversion repository. The alias (alternate name) for this cmdlet is Verify-SvnRepository. The following checks are available:

  • LocalData: Verifies the integrity of data stored in a repository, equivalent to the svnadmin verify command.

  • ReplicationConsistency: Performs the replication consistency check for the specified VDFS slave repository.

Example 1: Verify the MyRepo repository

Test-SvnRepository MyRepo -Check LocalData

Example 2: Check the replication consistency for the SlaveRepo VDFS slave repository

Test-SvnRepository SlaveRepo -Check ReplicationConsistency

Example 3: Perform all applicable checks for all repositories

Test-SvnRepository * -Check LocalData, ReplicationConsistency

Test-SvnRepositoryBackup

Available since VisualSVN Server 5.4.

Verifies the integrity of the specified repository backups, i.e. verifies whether these backups can be successfully read, are not corrupted and are valid restoration points. For an incremental backup, the cmdlet also verifies the presence and integrity of all the backups that this incremental backup depends on.

The cmdlet supports the -EncryptionPassword parameter to verify encrypted backups, and the -Credential parameter to provide custom credentials for accessing the backup files. Note that using these two optional parameters requires PowerShell 4.0 or later to be installed on the machine.

Example 1: Verify the integrity of a backup file

Test-SvnRepositoryBackup "D:\Backups\MyRepo-2024-05-26-113000-full.vsvnbak"

Example 2: Verify the integrity of an encrypted backup file

$password = Read-Host -AsSecureString 
**********
Test-SvnRepositoryBackup "D:\Backups\MyRepo-2024-05-26-113000-full.vsvnbak" -EncryptionPassword $password

Example 3: Verify the integrity of a backup file (stored on a network share), with custom credentials to access the backup

Test-SvnRepositoryBackup "\\share\MyRepo-2024-05-26-113000-full.vsvnbak" -Credential (Get-Credential)

Example 4: Verify the integrity of all backup files in a folder

Get-Item "D:\Backups\*.vsvnbak" | Test-SvnRepositoryBackup

Example 5: Verify the integrity of all backups created by a particular backup job

Get-SvnRepositoryBackup -JobName MyJob | Test-SvnRepositoryBackup

Example 6: Same as example 5, but with custom credentials to access the backups

Get-SvnRepositoryBackup -JobName MyJob | Test-SvnRepositoryBackup -Credential (Get-Credential)

Update-SvnRepository

Available since VisualSVN Server 3.9.

Upgrades the repository to the latest Subversion repository format. This operation is currently equivalent to the svnadmin upgrade command. The alias (alternate name) for this cmdlet is Upgrade-SvnRepository.

Note
After upgrade you will be unable to host the repository using older versions of the server.

Example 1: Upgrade the MyRepo repository to the latest format

Update-SvnRepository MyRepo
Last Modified: