How to move computer within OU in Active Directory

6 views
Skip to first unread message

Stefano Leandro

unread,
Jun 27, 2019, 12:59:42 PM6/27/19
to Ansible Project
Hi,

I would to ask how to move computer within OU in Active Directory .

Im thinking to use the module

win_domain_computer


like this :
---
- name: Moving AD Computer into OU Testing ....
  hosts: all
  gather_facts: no
  tasks:
    - win_domain_computer:
        name: "{{ inventory_hostname }}"
        ou: "OU=Infrastructure,OU=Testing,DC=my,DC=domain"
        dns_hostname: "{{ inventory_hostname }}".my.domain
        state: present
      delegate_to: winsrv01


Someone could suggest me something ?


Thank you
Reply all
Reply to author
Forward
0 new messages