Closed HMA86 closed 7 months ago
How did you install this collection? Are you 100% sure you are running with Ansible 2.14?
Hi, thanks for the answer. It was tested with ansible 2.15. Collection has been installed using ansibe-galaxy command. In addition i have tested old module "community windows.win_domain_computer" and works just fine. Issue is with this new module. I would like to use the new one, because of two reasons, old module is deprecated and this new module has a playbook to manage objects.. Thank you.
What connection plugin are you using to connect to the Windows host? The Invoke-AnsibleADObject
cmdlet is part of a shared module util which should be automatically loaded with the module so understanding what is running this might help figure out why it's failing on your host. Can you show the full task output with -vvv
please?
I was able to identify the error, basically it wasn´t the module fault, it was the EE. Thanks for the help.
SUMMARY
"exception": "The term 'Invoke-AnsibleADObject' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.\r\nAt line:39 char:1\r\n+ Invoke-AnsibleADObject @setParams\r\n+, : line 39\r\n",
"msg": "Unhandled exception while executing module: The term 'Invoke-AnsibleADObject' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.",
"_ansible_no_log": false,
~~~~~~\r\n + CategoryInfo : ObjectNotFound: (Invoke-AnsibleADObject:String) [], ParentContainsErrorRecordException\r\n + FullyQualifiedErrorId : CommandNotFoundException\r\n\r\nScriptStackTrace:\r\natISSUE TYPE
Unable to use microsoft.ad module Tested with microsoft.ad.computer and microsoft.ad.object
COMPONENT NAME
Minimum requirements such as krb5 to connect to Windows and windows machine with AD module for powershell
ANSIBLE VERSION
ansible = 2.14
OS / ENVIRONMENT
Windows 2019
STEPS TO REPRODUCE
Playbook executed with microsoft.ad to delete an object from Active Directory. Module seems to run but at the point that needs to pick this line Invoke-AnsibleADObject @setParams is not able to continue. Seems like the powershell module is not found
EXPECTED RESULTS
Be able to execute ansible playbook with result "change = true"
ACTUAL RESULTS
"exception": "The term 'Invoke-AnsibleADObject' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.\r\nAt line:39 char:1\r\n+ Invoke-AnsibleADObject @setParams\r\n+, : line 39\r\n",
"msg": "Unhandled exception while executing module: The term 'Invoke-AnsibleADObject' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.",
"_ansible_no_log": false,
~~~~~~\r\n + CategoryInfo : ObjectNotFound: (Invoke-AnsibleADObject:String) [], ParentContainsErrorRecordException\r\n + FullyQualifiedErrorId : CommandNotFoundException\r\n\r\nScriptStackTrace:\r\nat