# Getting started ```{image} /img/powervault_console.png :width: 450px :class: float-right ``` ## Start the PowerShell environment In order to get started either open any PowerShell IDE and load the powerVault Module by calling `Import-Module powerVault` or open the *powerVault Console* shortcut in the start menu, which already loads powerVault for you. ## Connect to Vault (optional) To use the powerVault Cmdlet's a Vault connections is required.\ In Vault applications (inside [powerEvents]() client customizations or Vault extensions such as [Data Standard]()), the Cmdlet's automatically detect and **reuse** the application’s latest Vault connection. However, in Powershell IDE's where a Vault connection does not already exist, the [Open-VaultConnection]() cmdlet can be used to create a new connection, passing the required credentials. ## Get a file from Vault With the Vault Connection available, you can start working with powerVault.\ Lets search for a random file which was created by the connected user: ```{code-block} powershell $user = $vaultConnection.UserName $file = Get-VaultFile -Properties @{"Created By"=$user} ``` ## Examine the file To check which properties our file has, we have two options.\ Either we just let the PowerShell Host print the `$file` object or we look at it in the Inspector window by calling the [Show-Inspector]() Cmdlet. ```{code-block} powershell Show-Inspector -Highlight 'file' ``` ```{image} /img/variableinspector.png :width: 400px ``` ## Update the file In case you want to update the file you can achieve this with the [Update-VaultFile]() Cmdlet.\ In this example we add an attachement to the file: ```{code-block} powershell $attachment = Get-VaultFile -Properties @{'File Extension'='dwf'} #Search for a .dwf file $updatedFile = Update-VaultFile -File $file.'Full Path' -Attachments @($attachment.'Full Path') -Comment "Set attachment" ``` ## Download the file You may want to download the file from Vault. For ths operation you can use the [Save-VaultFile]() Cmdlet.\ In this example we download the file with the recently added attachement: ```{code-block} powershell $downloadedFiles = Save-VaultFile -File $updatedFile.'Full Path' -IncludeAttachments -DownloadDirectory "C:\Temp\Vault\Sample" $downloadedFiles | select {$_.LocalPath} #C:\Temp\Vault\Sample\Designs\InventorTestPE.ipt #C:\Temp\Vault\Sample\InventorTestPE.dwf ```