Action Script Using Active Directory Name

I’m trying to perform tasks based on the AD membership of the endpoint, but am having problems with the action script. The code below hangs and doesn’t evaluate True or False on the first line. If I place the code in { } I get “This expression contained a character which is not allowed”. Is this perhaps because this relevance needs to be evaluated by the local client?

if dns domainname of local computer of active directory as lowercase = "domain-1.com"

 [content 1]

elseif dns domainname of local computer of active directory as lowercase = "domain-2.com"

 [content 2]

endif

I get the same error message. I think it’s because the Fixlet Debugger cannot / is not allowed to run in the local client space when using actionscript like it can when using qna.

See below where that option is greyed out when I’m on the Action tab:

However, I was able to run this just fine in an actual actionscript task, so you should be good to use it:

if {dns domainname of local computer of active directory as lowercase = "dns.mycompany.net"}
  parameter "DomainName" = "Domain1"
elseif {dns domainname of local computer of active directory as lowercase = "dns.mycompany.com"}
  parameter "DomainName" = "Domain2"
endif

Great! I guess I should have taken the extra step and tried it live! :yum:

1 Like