This code should be check the connection status from vault.
I found out that all rows are linked with $serviceManager produce this
Errormessage:
New-Object : Ausnahme beim Aufrufen von ".ctor" mit 1 Argument(en): "301"
I follow the iinstructions from the video and put the "gatekeeper" in the right directory and install the sdk
[System.Reflection.Assembly]::LoadFrom('C:\Program Files\Autodesk\Autodesk Vault 2022 SDK\bin\x64\Autodesk.Connectivity.WebServices.dll')
[System.Reflection.Assembly]::LoadFrom('C:\Program Files\Autodesk\Autodesk Vault 2023 SDK\bin\x64\Autodesk.DataManagement.Client.Framework.dll')
[System.Reflection.Assembly]::LoadFrom('C:\Program Files\Autodesk\Autodesk Vault 2023 SDK\bin\x64\Autodesk.Connectivity.WebServices.WCF.dll')
[System.Reflection.Assembly]::LoadFrom('C:\Program Files\Autodesk\Autodesk Vault 2023 SDK\bin\x64\Autodesk.DataManagement.Client.Framework.Vault.dll')
$serverIdentities = New-Object Autodesk.Connectivity.WebServices.ServerIdentities
$serverIdentities.DataServer = "adress"
$serverIdentities.FileServer = "adress"
$VaultName = "Vaultname"
$Username = "Name"
$password = "password"
$licenseType = [Autodesk.Connectivity.WebServices.LicensingAgent]::Server
$userPasswordCredentials = New-Object Autodesk.Connectivity.WebServicesTools.UserPasswordCredentials(
$serverIdentities, "Vault", "Administrator", "", $licenseType)
$serviceManager = New-Object Autodesk.Connectivity.WebServicesTools.WebServiceManager($userPasswordCredentials)
Write-Output($serviceManager.ReplicationService.GetlocalWorkgroup())
Write-Output($serviceManager.InformationService.GetServerName())
Write-Output($serviceManager.InformationService.GetSystemProducts())
$serviceManager.Dispose()
When I comment out all the lines with $serviceManager, no error message appears.
I use also Visual Studio Code with Powershell extension.