Joining Workgroup using powershell fails if domain controller cannot be reachedHyper-V Server - Can't UnJoin...

GeometricMean definition

I encountered my boss during an on-site interview at another company. Should I bring it up when seeing him next time?

Which aircraft had such a luxurious-looking navigator's station?

How do ISS astronauts "get their stripes"?

Should I choose Itemized or Standard deduction?

Sometimes a banana is just a banana

What do the pedals on grand pianos do?

Hacker Rank: Array left rotation

What can I substitute for soda pop in a sweet pork recipe?

As a new poet, where can I find help from a professional to judge my work?

Easy code troubleshooting in wordpress

Borrowing Characters

How can atoms be electrically neutral when there is a difference in the positions of the charges?

What to do when being responsible for data protection in your lab, yet advice is ignored?

How would we write a misogynistic character without offending people?

Most significant research articles for practical investors with research perspectives

What is the wife of a henpecked husband called?

What if I store 10TB on azure servers and then keep the vm powered off?

Is there any relevance to Thor getting his hair cut other than comedic value?

Equivalent to "source" in OpenBSD?

How to count occurrences of Friday 13th

When should a commit not be version tagged?

You'll find me clean when something is full

Book where the good guy lives backwards through time and the bad guy lives forward



Joining Workgroup using powershell fails if domain controller cannot be reached


Hyper-V Server - Can't UnJoin An Orphaned DomainJoining domain in depolying image with Unattend fileWindows 7 cannot join samba domainBroken trust relationship not corrected even after leaving and joining domain with new computer nameWindows XP Computer moved from domain member to workgroup member: Can I restore my old user profile?Windows Server 2012 - Can't join computer to the domainJoining AD domain with Windows 10 using smart cardRemoting from a WORKGROUP PC to Domain-Joined PCCannot join domain despite able to ping to domain to domain controller by domain name and ipPowershell remote access denied on workgroupJoin Server to Worfkgroup Without Creds?













1















I have a Windows machine that has been cloned and to keep it from overwriting DNS entries it has only port 3389 enabled. What I am currently doing is using the GUI to join a workgroup and then renaming the computer before re-joining the domain. This works when done through the GUI but when done via Powershell it fails to leave domain and join workgroup.



I was attempting to use:



Add-Computer -WorkGroupName MyWorkGroup


However this gives the error:



 Add-Computer : Failed to unjoin computer from domain with the following error message: The
specified domain either does not exist or could not be contacted.


I though perhaps running Powershell as the local Administrator might work, but that encountered the same error. I though maybe using the cached domain admin account might work, but also get the same error. I thought maybe specifying any or all of the Credential/LocalCredential/UnjoinDomainCredential parameters might help but that yielded no luck either.



It seems like there has to be a way to do this through Powershell that I am overlooking. Any advice is appreciated.










share|improve this question







New contributor




LK86 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Perhaps an obvious question, but can you maybe disjoin it before you leave the domain?

    – Zoredache
    6 hours ago











  • @Zoredache Unfortunately I cannot disjoin it first. The clone is created from a backup of a production system.

    – LK86
    6 hours ago













  • I haven't used that command in that type of situation, but have you tried passing a -force? Worst case, it may be that you could use netdom. serverfault.com/questions/511317/…

    – Zoredache
    6 hours ago











  • @Zoredache -force did not work but the netdom command did work. Thank you!

    – LK86
    4 hours ago
















1















I have a Windows machine that has been cloned and to keep it from overwriting DNS entries it has only port 3389 enabled. What I am currently doing is using the GUI to join a workgroup and then renaming the computer before re-joining the domain. This works when done through the GUI but when done via Powershell it fails to leave domain and join workgroup.



I was attempting to use:



Add-Computer -WorkGroupName MyWorkGroup


However this gives the error:



 Add-Computer : Failed to unjoin computer from domain with the following error message: The
specified domain either does not exist or could not be contacted.


I though perhaps running Powershell as the local Administrator might work, but that encountered the same error. I though maybe using the cached domain admin account might work, but also get the same error. I thought maybe specifying any or all of the Credential/LocalCredential/UnjoinDomainCredential parameters might help but that yielded no luck either.



It seems like there has to be a way to do this through Powershell that I am overlooking. Any advice is appreciated.










share|improve this question







New contributor




LK86 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Perhaps an obvious question, but can you maybe disjoin it before you leave the domain?

    – Zoredache
    6 hours ago











  • @Zoredache Unfortunately I cannot disjoin it first. The clone is created from a backup of a production system.

    – LK86
    6 hours ago













  • I haven't used that command in that type of situation, but have you tried passing a -force? Worst case, it may be that you could use netdom. serverfault.com/questions/511317/…

    – Zoredache
    6 hours ago











  • @Zoredache -force did not work but the netdom command did work. Thank you!

    – LK86
    4 hours ago














1












1








1








I have a Windows machine that has been cloned and to keep it from overwriting DNS entries it has only port 3389 enabled. What I am currently doing is using the GUI to join a workgroup and then renaming the computer before re-joining the domain. This works when done through the GUI but when done via Powershell it fails to leave domain and join workgroup.



I was attempting to use:



Add-Computer -WorkGroupName MyWorkGroup


However this gives the error:



 Add-Computer : Failed to unjoin computer from domain with the following error message: The
specified domain either does not exist or could not be contacted.


I though perhaps running Powershell as the local Administrator might work, but that encountered the same error. I though maybe using the cached domain admin account might work, but also get the same error. I thought maybe specifying any or all of the Credential/LocalCredential/UnjoinDomainCredential parameters might help but that yielded no luck either.



It seems like there has to be a way to do this through Powershell that I am overlooking. Any advice is appreciated.










share|improve this question







New contributor




LK86 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I have a Windows machine that has been cloned and to keep it from overwriting DNS entries it has only port 3389 enabled. What I am currently doing is using the GUI to join a workgroup and then renaming the computer before re-joining the domain. This works when done through the GUI but when done via Powershell it fails to leave domain and join workgroup.



I was attempting to use:



Add-Computer -WorkGroupName MyWorkGroup


However this gives the error:



 Add-Computer : Failed to unjoin computer from domain with the following error message: The
specified domain either does not exist or could not be contacted.


I though perhaps running Powershell as the local Administrator might work, but that encountered the same error. I though maybe using the cached domain admin account might work, but also get the same error. I thought maybe specifying any or all of the Credential/LocalCredential/UnjoinDomainCredential parameters might help but that yielded no luck either.



It seems like there has to be a way to do this through Powershell that I am overlooking. Any advice is appreciated.







windows active-directory powershell windows-server-2012






share|improve this question







New contributor




LK86 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




LK86 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




LK86 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 6 hours ago









LK86LK86

61




61




New contributor




LK86 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





LK86 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






LK86 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • Perhaps an obvious question, but can you maybe disjoin it before you leave the domain?

    – Zoredache
    6 hours ago











  • @Zoredache Unfortunately I cannot disjoin it first. The clone is created from a backup of a production system.

    – LK86
    6 hours ago













  • I haven't used that command in that type of situation, but have you tried passing a -force? Worst case, it may be that you could use netdom. serverfault.com/questions/511317/…

    – Zoredache
    6 hours ago











  • @Zoredache -force did not work but the netdom command did work. Thank you!

    – LK86
    4 hours ago



















  • Perhaps an obvious question, but can you maybe disjoin it before you leave the domain?

    – Zoredache
    6 hours ago











  • @Zoredache Unfortunately I cannot disjoin it first. The clone is created from a backup of a production system.

    – LK86
    6 hours ago













  • I haven't used that command in that type of situation, but have you tried passing a -force? Worst case, it may be that you could use netdom. serverfault.com/questions/511317/…

    – Zoredache
    6 hours ago











  • @Zoredache -force did not work but the netdom command did work. Thank you!

    – LK86
    4 hours ago

















Perhaps an obvious question, but can you maybe disjoin it before you leave the domain?

– Zoredache
6 hours ago





Perhaps an obvious question, but can you maybe disjoin it before you leave the domain?

– Zoredache
6 hours ago













@Zoredache Unfortunately I cannot disjoin it first. The clone is created from a backup of a production system.

– LK86
6 hours ago







@Zoredache Unfortunately I cannot disjoin it first. The clone is created from a backup of a production system.

– LK86
6 hours ago















I haven't used that command in that type of situation, but have you tried passing a -force? Worst case, it may be that you could use netdom. serverfault.com/questions/511317/…

– Zoredache
6 hours ago





I haven't used that command in that type of situation, but have you tried passing a -force? Worst case, it may be that you could use netdom. serverfault.com/questions/511317/…

– Zoredache
6 hours ago













@Zoredache -force did not work but the netdom command did work. Thank you!

– LK86
4 hours ago





@Zoredache -force did not work but the netdom command did work. Thank you!

– LK86
4 hours ago










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






LK86 is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f956704%2fjoining-workgroup-using-powershell-fails-if-domain-controller-cannot-be-reached%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








LK86 is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















LK86 is a new contributor. Be nice, and check out our Code of Conduct.













LK86 is a new contributor. Be nice, and check out our Code of Conduct.












LK86 is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Server Fault!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f956704%2fjoining-workgroup-using-powershell-fails-if-domain-controller-cannot-be-reached%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

117736 Шеррод Примітки | Див. також | Посилання | Навігаційне...

As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

Маріан Котлеба Зміст Життєпис | Політичні погляди |...