I tried that too, if I put State present, it’s asking for ou parameter is required. I want to retrieve it’s OU location. It just keep on asking one by one parameters as required. The documentation page for this module only says name is mandatory parameter, rest is optional.
Get-ADConputer will just work with identity as only parameter required.
The documentation page for this module only says name is mandatory parameter, rest is optional.
There is only 1 option that is always required ‘name’, but if you read the description you can see that there are multiple others that are required when ‘state=present’.
I want to retrieve it’s OU location
The module doesn’t look like it will do what you want, it’s designed to enforce a state which requires input. If you want to get the status/info of an existing resource you will have to develop your own win_domain_computer_info module or just use ‘win_shell: Get-ADComputer’ as you’ve already pointed out only requires the identity.