I need to specify vault to be used in script. I do that in script using next code:
$RdmVault = Get-RDMRepository -Name $Vault
Set-RDMCurrentRepository -Repository $RdmVault
Abovementioned code always gets error:
Set-RDMCurrentRepository : Object reference not set to an instance of an object.
At C:\Projects\scripts.telia\src\TeamPass\new-testfoldertree.ps1:110 char:5
+ Set-RDMCurrentRepository -Repository $RdmVault
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: ( [Set-RDMCurrentRepository], NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,RemoteDesktopManager.PowerShellModule.SetRDMCurrentRepositoryCommand
Despite the error message, current vault is sucessfully changed.
Changing Set-RDMCurrentRepository commandline parameters from -Repository to -ID generates same error.
Adding -ErrorAction SilentlyContinue to commandline doesn't supress the message.
RDM version: 2019.1.30.0
Data source is Microsoft SQL Server
Meelis