Auto-populate check box type variable of catalog item as a params in power shell script automation.

saran raj
Tera Contributor

Hi,

I have a requirement to auto-populate check box type variable of catalog in power shell script automation.

I tried the below script for PS automation but the parameter response is coming as 'TRUE' as the variable is a checkbox. But the customer wants this variable (corporate..com) to display as a string. 

 

Could someone give me suggestions on this please?

 

Below is the PS automation script to auto populate the variables as parameters in logs:


'AccessType': ticket.variables.access_level4,
'UserName': ticket.variables.adm_network_id.getDisplayValue(),
'UserDomain': ticket.variables.chk_corp_com,
'ListofServers': ticket.variables.serverList4.getDisplayValue()

 

All the parameters are populating as expected expect "UserDomain' 

 

Here is the screenshot of logs response:

saranraj_0-1691508315447.png

The highlighted yellow is displaying as "TRUE" but the requirement is to display the domain name eg: corporate.abc.com

 

Could someone please help me with this auto-populate check box type variable in PS Script?

Thank you!

 

1 REPLY 1

saran raj
Tera Contributor

Hi,

Could someone please help me with the above query?

Thanks!