Code Snippets

Get all Vault users of a certain group
Issue In Powershell all the Autodesk Vault users of a certain group should be determined via API. Solution The following function will return all user...
Wed, 29 Nov, 2017 at 2:41 PM
How to copy a file to a windows directory
Issue A file should be copied to a different windows directory and the directory should be created if it does not exist. Solution The Copy-Item comman...
Wed, 29 Nov, 2017 at 2:30 PM
How to get a filename without the extension
Issue The name of a file without the extension is needed. Solution The method GetFileNameWithoutExtension() from the .NET class System.IO.Path can be ...
Wed, 29 Nov, 2017 at 2:34 PM
Print a file with the windows default printer
Description A locally saved file should be printed using the windows default printer. Solution Use the Start-Process commandlet with the -Verb Print o...
Fri, 17 Nov, 2017 at 11:15 AM
Set the windows default printer
Description Set a new windows default printer via Powershell. Solution To find the new printer the Get-WmiObject commandlet with the -Class Win32_Prin...
Wed, 29 Nov, 2017 at 2:37 PM
Query an SQL server
Description Execute commands and retrieve data from an SQL server using PowerShell. Solution The .NET classes provided by the System.Data.SqlClient na...
Wed, 29 Nov, 2017 at 2:39 PM
How to download a file via Vault API
Issue A Vault file should be downloaded with a rule set that is not possible in Save-VaultFile.  Solution function Get-VdfFile{ Param( [...
Wed, 29 Nov, 2017 at 11:49 AM
Export Vault Data to XML
Issue A XML file should be generated based on data from Vault Solution $file = PrepareEnvironmentForFile "Catch Assembly.idw" $xmlPa...
Wed, 29 Nov, 2017 at 2:46 PM