Hagerman Blog

Vault/ powerVault

Posted by Mike Space on Aug 12, 2019 2:13:26 PM

2019-news-aug-vault-1powerVault is a native PowerShell extension that allows you to talk with Vault via pure PowerShell command-lets.

With powerVault, you get command-lets for dealing with files and items. For instance “Open-VaultConnection” for establishing a connection to Vault, or “Get-VaultFile” for getting/downloading a file, or “Get-VaultItem” for getting an item and many more.

Such command-lets make it very easy to either get information from Vault or create and update information in Vault. You don’t have to deal with the complexity of the Vault API instead, you can just execute the command you like and let the command-let do the rest.

Here are some examples:

Get-VaultFile -File "$/Designs/Assemblies/PadLock/Pad Lock.iam" -DownloadPath c:\temp\padlock

You will notice that the assembly including children will be downloaded and the references will be redirected, so it’s ready to be opened!

And what if you like to get all files of a given folder?

$files = Get-VaultFiles -Folder "$/Designs/Assemblies/PadLock"

Or why not make a search in Vault for all the released drawings?

$files = Get-VaultFiles -Properties @{"File Extension"="idw";"State"="Released"}

You can start to get a feel for the simplicity of powerVault. For those of you who like to use the native API, no problem. By establishing the connection to Vault (Open-VaultConnection), you also get the variables $vault (complete webservices), $vaultConnection (VDF) and $vaultExplorerUtil. You are free to mix the command-lets with the native Vault API, so you get the best of both. 

Here are some links to help you get started:

 

 

Happy Scripting!

Topics: Tips and Tricks, Vault

Back to home