ScriptStackTrace:
at , : line 239
fatal: [localhost -> ansapp004p.denverco.gov]: FAILED! => {
"changed": false,
"msg": "Unhandled exception while executing module: Unable to find type [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException]."
}
`
This is on a windows 2019 server with the ActiveDirectory module installed
If I run this on a windows 2022 server everything works as expected.
Both are have dot net 4.8 installed powershell 5
TASK [Find user samaccountname] **
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: at , : line 239
fatal: [localhost -> ansapp004p.denverco.gov]: FAILED! => {"changed": false, "msg": "Unhandled exception while executing module: Unable to find type [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException]."}
SUMMARY
When I execute this task:
I get this error: ` The full traceback is: Unable to find type [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException]. At line:239 char:22
ScriptStackTrace: at, : line 239
fatal: [localhost -> ansapp004p.denverco.gov]: FAILED! => {
"changed": false,
"msg": "Unhandled exception while executing module: Unable to find type [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException]."
}
`
This is on a windows 2019 server with the ActiveDirectory module installed
If I run this on a windows 2022 server everything works as expected.
Both are have dot net 4.8 installed powershell 5
ISSUE TYPE
COMPONENT NAME
microsoft/ad/plugins/modules/object_info.ps1
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
see summary
EXPECTED RESULTS
TASK [show results] ** ok: [localhost] => { "msg": [ { "changed": false, "failed": false, "objects": [ { "DistinguishedName": "CN=Troy........", "Name": "Troy, Holly -......", "ObjectClass": "user", "ObjectGUID": "44118295-......7e3a24c53d9", "samaccountname": "20....." } ] } ] }
ACTUAL RESULTS
TASK [Find user samaccountname] ** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: at, : line 239
fatal: [localhost -> ansapp004p.denverco.gov]: FAILED! => {"changed": false, "msg": "Unhandled exception while executing module: Unable to find type [Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException]."}