Forum Discussion
wats9416
Oct 30, 2024Copper Contributor
Deploying Azure VM via DevOps pipeline and ARM template -- how to join to the domain?
Hello, I am working on a DevOps pipeline that is able to deploy an Azure VM with an ARM template I've put together. The server is part of a workgroup when created, and I need to add a task to my...
Kidd_Ip
Nov 01, 2024MVP
Try below:
# Disable Windows Firewall
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False
# Join the domain
Add-Computer -DomainName "yourdomain.com" -Credential (Get-Credential) -Restart
# Re-enable Windows Firewall
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True