Hello.
is it possible to check if current DataSource is online or offline from powershell ?
Many thanks.
Regards,
Ivo Pastyrik
Hello,
Sadly, it is not possible to verify, with the RDM PowerShell module, if the data source is online or on offline mode.
What data source type are you using?
Best regards,
Érica Poirier
Hello,
thank you for reply.
We are using MS SQL as data source.
I want to stop processing of script at beginning when data source is offline, because I'm adding attachment to session at the end of script.
So it is not necessary to process whole script when attachment will not be added at the end while data source is offline.
Best regards,
Ivo Pastyrik
Hello,
Thank you for the information.
An improvement ticket has been sent to our engineering department to add a property on the data Source object to verify if it's online or offline. The internal ticket number is RDMW-5089. Once an update will be available, we will let you know.
Best regards,
Érica Poirier
Hi,
We added two attributes in the PowerShell module PSDataSource object: IsConnected and IsOffline.
There are two attributes to avoid to think that when IsOffline is false it means that you are Online which is not automatically true because the data source can be in a "Not Connected" state, which means you are not in Offline mode or in Online mode but just currently not connected to the data source.
It can be visualized this way:
IsConnected = True; IsOffline = False => You are currently connected on this data source in online mode
IsConnected = True; IsOffline = True => You are currently connected on this data source in offline mode
IsConnected = False; IsOffline = False => You are currently not connected on this data source
How to use:
$dt = Get-RDMCurrentDataSource $dt.IsConnected $dt.IsOffline $dts = Get-RDMDataSource $dts[0].IsConnected $dts[0].IsOffline
It will be available in an upcoming RDM version.
Best regards,
Olivier Désalliers
nice post.