Hi,
we import a large number of connection defined in/with
import.ps1:
$xmlData = "./connections.rdm"
95 $import = Import-RDMSession -path $xmlData -DuplicateAction Overwrite
96 $session = Set-RDMSession -Session $import -Refresh -Verbose
most of the data are also imported. but how a few don't and we get the following messages.
How can you identify these?VERBOSE: [Set-RDMSession] StartSet-RDMSession: /home/rdm/rdmImportObjects.ps1:96Line | 96 | … $session = Set-RDMSession -Session $import -Refresh -Verbose -Debug … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Connection has invalid group specified.Set-RDMSession: /home/rdm/rdmImportObjects.ps1:96Line | 96 | … $session = Set-RDMSession -Session $import -Refresh -Verbose -Debug … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Connection has invalid group specified.Set-RDMSession: /home/rdm/rdmImportObjects.ps1:96Line | 96 | … $session = Set-RDMSession -Session $import -Refresh -Verbose -Debug … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Connection has invalid group specified.Set-RDMSession: /home/rdm/rdmImportObjects.ps1:96
Hello,
This is caused when an entry is created before its folder. To avoid this, you can use the SetSession switch of the Import-RDMSession command.
$import = Import-RDMSession -path $xmlData -DuplicateAction Overwrite -SetSession
Many thanks. Is it possible to display the specific entry?
Hello,
At the moment, it is not possible. In the next version of the module, we will improve on the error message to include the failed entry.
Regards,
Maxime
Hello,
The module 2023.2.0.9 has been released. The entry is stored in the TargetObject of the error variable, so it is now possible to know which entries have failed.
Regards,
Maxime Bernier