i need to join PCs with public and domestic firewall profiles activated. If i shutdown both firewalls profile in target Host the following command works fine.
Add-Computer -ComputerName $targetHost-DomainName domain.com -Credential $Global:credentialObject -LocalCredential $targetHost\localAdmin -Restart
But in the production scenario i need to open specific ports by using a domain policy. The idea of this script is to remove PC from domain and add it for other reasons
So, what ports do i need to open in $targetHost firewall?
Thanks