Skip to content

zackasattackas/Microsoft.VssAdmin

Repository files navigation

Microsoft.VssAdmin

PowerShell module for the Vssadmin utility

Table of Contents

Command -> Function Lookup

VssAdmin Command Wrapper Function Status
add shadowstorage Add-VssShadowStorage Complete
create shadow New-VssShadowCopy Complete
delete shadows Remove-VssShadowCopy Complete
list providers Get-VssProvider Complete
list shadows Get-VssShadowCopy Complete
list shadowstorage Get-VssShadowStorage Complete
list volumes Get-VssVolume Complete
list writers Get-VssWriter Complete
resize shadowstorage Resize-VssShadowStorage Complete

Examples

Example #1

Get all VSS writers not in the VssWriterState.Stable state

PS> Get-VssWriter -Exclude Stable
Example #2

Get writers in a failed state and restart the host Windows Service

PS> Get-VssWriter | Where-Object {$_.State -like 'Failed*'} | Get-VssWriterService -Unique | Restart-Service -Force
Example #3

Update the MaxSize for a ShadowCopy storage association to 5%

PS> Get-VssShadowStorage -ForVolume C: | Resize-VssShadowStorage -NewSize 5 -As %

Update the MaxSize to UNBOUNDED

PS> Get-VssShadowStorage -ForVolume C: | Resize-VssShadowStorage -Unbounded
Example #4

List all ShadowCopies created by a specified Provider

PS> Get-VssShadowCopy -Provider 'Microsoft Software Shadow Copy provider 1.0'

Download & Install

  1. Download the latest version of the module files here.

  2. Make sure to unblock the archive before extracting the contents.

    alt text

  3. Save the module files to one of the directories in your $env:PSModulePath variable

    alt text