We are currently using Connectwise Automate as our RMM and are trying to use the command "Get-CWAComputerEDF " to grab the value from one of the extra data fields for a Computer from Automate. Unfortunately when we have tried we get an array.
Results:CWARecoveryKeyEDFValue: @{TargetId=1320; ExtraFieldDefinitionId=784; Title=BitlockerRecoveryKey; DisplayFormat=; Location=; TitleFormat=; Section=Default; Tooltip=Recovery Key Saved by ImmyBot; IsReadOnly=False; TextFieldSettings=}
We have tried to target properties of the field but we are not sure of the syntax. Has anyone else worked with Connectwise Automate and the "Get-CWAComputerEDF " command that may know how to grab a value from a field?
I’ve used Get-CWAClientEDF before, eg:
$vpn_otp_secret = Get-CWAClientEDF -FieldName “VPN OTP Secret”
I just had a peek at the scripts though, the last line of Get-CWAClientEDF looks like this:
Invoke-CWARestMethod $Uri -Provider $RmmInfo.Provider -QueryParams $QueryParams | ?{$_.Title -like $FieldName} | select -Expand FieldSettings | select -Expand value
But Get-CWAComputerEDF looks like this:
Invoke-CWARestMethod $Uri -Provider $RmmInfo.Provider -QueryParams $QueryParams | ?{$_.Title -like $FieldName}
So you could probably do “| select -Expand FieldSettings | select -Expand value” to get the actual value, but this feels like it’s probably a bug so i’d log a support ticket to get it fixed
James thanks for the reply. I attempted to use the syntax you provided for Get-CWAClientEDF but “FieldSettings” is not a known property of the output for Get-CWAComputerEDF