Skip to content

Instantly share code, notes, and snippets.

@pspete
Last active May 31, 2022 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pspete/dbe6ca8789ee44ecdd1c356ddf29f528 to your computer and use it in GitHub Desktop.
Save pspete/dbe6ca8789ee44ecdd1c356ddf29f528 to your computer and use it in GitHub Desktop.
Deletes "CPMStatus","RetriesCount","CPMDisabled" & "LastTask" FileCategories.
$VaultIP = "192.168.70.10"
$VaultUser = "SomeUser"
$VaultPW = Read-Host -AsSecureString -Prompt "Password for User $VaultUser`:"
$SafeName = "SomeSafe"
$FileCategories = @("CPMStatus","RetriesCount","CPMDisabled","LastTask")
#Install PoShPACLI
Install-Module PoShPACLI -Scope CurrentUser
#Import PoShPACLI
Import-Module PoShPACLI
#Set Path to PACLI.exe
Set-PVConfiguration -ClientPath D:\PACLI\Pacli.exe
#PACLI Logon
Start-PVPacli
New-PVVaultDefinition -vault PACLIVault -address $VaultIP
Connect-PVVault -password $VaultPW -user $VaultUser
#Get Files
$files = Open-PVSafe -safe $SafeName | Get-PVFileList -folder root
#Delete FileCategories
foreach($Category in $FileCategories){$files | Remove-PVFileCategory -category $Category}
#Logoff
Disconnect-PVVault
#Stop PACLI Process
Stop-PVPacli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment