windows.domain_controller
This model component provides functionality for managing a Windows domain controller. It includes methods for setting up a domain controller, adding and managing users and groups, configuring organizational units (OUs), and establishing trust relationships with remote forests.
The following VM resources are provided with this model component:
join_windows_domain.ps1 - Joins a Windows machine to a specified domain.
install_domain_controller.ps1 - Installs and configures a domain controller on a Windows Server VM.
change_password.ps1 - Changes the password for a specified user.
add_activedirectory_users.ps1 - Adds or updates Active Directory users.
add_OU.ps1 - Adds an Organizational Unit (OU) to Active Directory.
add_ad_group.ps1 - Adds a group to Active Directory.
add_ad_user_to_group.ps1 - Adds a user to a group in Active Directory.
add_domain_site_subnet.ps1 - Adds a replication site and subnet to Active Directory.
add_users_to_adgroup.ps1 - Adds users to an Active Directory group.
create_bidirectional_trust.ps1 - Adds a bidirectional trust relationship with a remote forest.
create_conditional_forwarder.bat - Adds a conditional forwarder to the DNS server.
join_child_windows_domain.ps1 - Joins a child domain to the domain controller.
move_ad_objects.ps1 - Moves Active Directory objects to a different Organizational Unit (OU).
remove_ad_user.ps1 - Removes a user from Active Directory.
remove_domain_site_subnet.ps1 - Removes a replication subnet from Active Directory.
reset_trust.ps1 - Resets the trust relationship with a remote forest.
Available Objects
- class windows.domain_controller.DomainController(domain_id, domain_name, netbios_name)[source]
Bases:
objectThe DomainController class provides functionality for managing a Windows domain controller.
- __annotate_func__ = None
- __annotations_cache__ = {}
- __firstlineno__ = 1
- __init__(domain_id, domain_name, netbios_name)[source]
Initialize the Domain Controller.
- windows_domain
A dictionary of domain-related properties. These will be used by other model components to connect VMs to the domain controller and ensure proper domain configuration throughout the experiment. Properties in this dictionary include:
id- A unique identifier for this domain. This is used only on the graph so we have unambiguous names for client/controller relationships.controller- If set toTrue, this host will run theVM resource to set up a DC.
name- The DNS name of the Windows domain to join or control.netbios- The NETBIOS (short, used in usernames, etc.) name for the domain.Only valid on domain controllers, should be ignored on other vertices. If not present, will be set to the first group in the DNS domain name (that is, for
test.foo.local, the NETBIOS name would beTEST).
- Type:
- __static_attributes__ = ('windows_domain',)
- add_ad_replication_site(start_time, site, subnet)[source]
Adds a replication site and subnet to Active Directory.
- add_bidirectional_trust(start_time, remote_forest_name, remote_username, remote_password)[source]
Adds a bidirectional trust relationship with a remote forest.
- add_conditional_forwarder(start_time, zone, ip)[source]
Adds a conditional forwarder to the DNS server.
- add_inbound_trust(start_time, remote_forest_name, remote_username, remote_password)[source]
Adds an inbound trust relationship with a remote forest.
- add_local_bidirectional_trust(start_time, remote_forest_name, trust_password)[source]
Adds a local bidirectional trust relationship with a remote forest.
- add_ou(start_time=-20, name=None, path=None)[source]
Adds an Organizational Unit (OU) to Active Directory.
- add_users(users)[source]
Adds multiple users to the domain.
- Parameters:
users (list) – A list of dictionaries containing user information.
- add_users_to_group(start_time=-23, users=None, group=None)[source]
Adds users to an Active Directory group.
- move_ad_objects(start_time, ou_group, endpoints, domain)[source]
Moves Active Directory objects to a different Organizational Unit (OU).
- remove_ad_replication_subnet(start_time, subnet)[source]
Removes a replication subnet from Active Directory.