Last active
May 31, 2022 15:32
-
-
Save pspete/dbe6ca8789ee44ecdd1c356ddf29f528 to your computer and use it in GitHub Desktop.
Deletes "CPMStatus","RetriesCount","CPMDisabled" & "LastTask" FileCategories.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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