# unistall windows server

**URL:** <https://forum.ansible.com/t/unistall-windows-server/33865>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [September 22, 2020, 2:58pm UTC](https://forum.ansible.com/t/unistall-windows-server/33865 "2020-09-22T14:58:10Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![PRAVEEN\_KATTULAPALLI](https://avatars.discourse-cdn.com/v4/letter/p/e79b87/32.png) [@PRAVEEN\_KATTULAPALLI](https://forum.ansible.com/u/PRAVEEN_KATTULAPALLI)\
**Post date:** [September 22, 2020, 2:58pm UTC](https://forum.ansible.com/t/unistall-windows-server/33865/1 "2020-09-22T14:58:10Z")

</div>

Hii all,  
could anyone share ansible script or basic format of script for windows server uninstallation. i couldn’t find any related scripts or modules in official docs.

---

<div class="post-metadata">

**Author:** ![Mauricio\_Tavares](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@Mauricio\_Tavares](https://forum.ansible.com/u/Mauricio_Tavares)\
**Post date:** [September 22, 2020, 3:41pm UTC](https://forum.ansible.com/t/unistall-windows-server/33865/2 "2020-09-22T15:41:53Z")

</div>

> Hii all,  
> could anyone share ansible script or basic format of script for windows server uninstallation. i couldn't find any related scripts or modules in official docs.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Would you mind explaining what "windows server uninstallation"  
means to you?

---

<div class="post-metadata">

**Author:** ![PRAVEEN\_KATTULAPALLI](https://avatars.discourse-cdn.com/v4/letter/p/e79b87/32.png) [@PRAVEEN\_KATTULAPALLI](https://forum.ansible.com/u/PRAVEEN_KATTULAPALLI)\
**Post date:** [September 22, 2020, 4:09pm UTC](https://forum.ansible.com/t/unistall-windows-server/33865/3 "2020-09-22T16:09:59Z")

</div>

Yes, what exactly it mean for example let us consider the case of windows server 2016. Please explain what exactly it mean and also please help me which is the correct windows modules work for this task…

---

<div class="post-metadata">

**Author:** ![PRAVEEN\_KATTULAPALLI](https://avatars.discourse-cdn.com/v4/letter/p/e79b87/32.png) [@PRAVEEN\_KATTULAPALLI](https://forum.ansible.com/u/PRAVEEN_KATTULAPALLI)\
**Post date:** [September 22, 2020, 4:13pm UTC](https://forum.ansible.com/t/unistall-windows-server/33865/4 "2020-09-22T16:13:04Z")

</div>

I mean how to remove windows server using ansible and also i am asking how we can do it manually

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [September 22, 2020, 4:21pm UTC](https://forum.ansible.com/t/unistall-windows-server/33865/5 "2020-09-22T16:21:00Z")

</div>

I don't think you can uninstall or remove an operating system, short  
of formatting the machine....

---

<div class="post-metadata">

**Author:** ![Gajendra\_Gaikwad1](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@Gajendra\_Gaikwad1](https://forum.ansible.com/u/Gajendra_Gaikwad1)\
**Post date:** [September 22, 2020, 7:16pm UTC](https://forum.ansible.com/t/unistall-windows-server/33865/6 "2020-09-22T19:16:02Z")

</div>

Do you mean decommission the windows machine from the infra??

---

<div class="post-metadata">

**Author:** ![dan\_linder](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dan_linder/32/3833_2.png) [@dan\_linder](https://forum.ansible.com/u/dan_linder)\
**Post date:** [September 22, 2020, 7:38pm UTC](https://forum.ansible.com/t/unistall-windows-server/33865/7 "2020-09-22T19:38:02Z")

</div>

When I get to a point where I’m asking “How do I do X in Ansible”, my first step is to make a checklist of what I would do if I was doing it manually.

Assuming when you ask “Windows server uninstallation” you mean to remove the host from AD, remove it from DNS, delete files, etc., then start decomposing each of those big steps into individual Ansible plays.

---

<div class="post-metadata">

**Author:** ![PRAVEEN\_KATTULAPALLI](https://avatars.discourse-cdn.com/v4/letter/p/e79b87/32.png) [@PRAVEEN\_KATTULAPALLI](https://forum.ansible.com/u/PRAVEEN_KATTULAPALLI)\
**Post date:** [September 23, 2020, 3:05am UTC](https://forum.ansible.com/t/unistall-windows-server/33865/8 "2020-09-23T03:05:22Z")

</div>

Yes , correct i am asking about windows server decommission.  
Could any one please share what is the exact meaning of word server decommission.

---

<div class="post-metadata">

**Author:** ![PRAVEEN\_KATTULAPALLI](https://avatars.discourse-cdn.com/v4/letter/p/e79b87/32.png) [@PRAVEEN\_KATTULAPALLI](https://forum.ansible.com/u/PRAVEEN_KATTULAPALLI)\
**Post date:** [September 23, 2020, 3:07am UTC](https://forum.ansible.com/t/unistall-windows-server/33865/9 "2020-09-23T03:07:57Z")

</div>

Yes, i am asking regarding windows server decommission on infra.

---

<div class="post-metadata">

**Author:** ![Gajendra\_Gaikwad1](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@Gajendra\_Gaikwad1](https://forum.ansible.com/u/Gajendra_Gaikwad1)\
**Post date:** [September 23, 2020, 4:02am UTC](https://forum.ansible.com/t/unistall-windows-server/33865/10 "2020-09-23T04:02:14Z")

</div>

Yes as Dan said, make a list what’s is the current process

For example

1. Playbook 1 - keep server in qurantain mode for 30 days (vm machine)

- remove or keep server in maintenance mode in monitoring
- take full backup
- stop backup job
- shutdown vm
- rename vm with current date

1. After qurantain

- remove from dns
- remove ad object
- remove from backup job
- remove from monitoring
- delete vm from VMware
- update free ip list
- update cmdb

---

<div class="post-metadata">

**Author:** ![PRAVEEN\_KATTULAPALLI](https://avatars.discourse-cdn.com/v4/letter/p/e79b87/32.png) [@PRAVEEN\_KATTULAPALLI](https://forum.ansible.com/u/PRAVEEN_KATTULAPALLI)\
**Post date:** [September 23, 2020, 5:04am UTC](https://forum.ansible.com/t/unistall-windows-server/33865/11 "2020-09-23T05:04:59Z")

</div>

Thanks, please tell me about delete vm and remove vm from dns

---

<div class="post-metadata">

**Author:** ![PRAVEEN\_KATTULAPALLI](https://avatars.discourse-cdn.com/v4/letter/p/e79b87/32.png) [@PRAVEEN\_KATTULAPALLI](https://forum.ansible.com/u/PRAVEEN_KATTULAPALLI)\
**Post date:** [September 23, 2020, 5:05am UTC](https://forum.ansible.com/t/unistall-windows-server/33865/12 "2020-09-23T05:05:37Z")

</div>

And also about remove from ad object

---

<div class="post-metadata">

**Author:** ![dan\_linder](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dan_linder/32/3833_2.png) [@dan\_linder](https://forum.ansible.com/u/dan_linder)\
**Post date:** [September 24, 2020, 1:58am UTC](https://forum.ansible.com/t/unistall-windows-server/33865/13 "2020-09-24T01:58:01Z")

</div>

> Thanks, please tell me about delete vm and remove vm from dns  
> and  
> And also about remove from ad object

These are not Ansible specific topics, these are tasks that you need to review other sources for ([Microsoft.com](http://Microsoft.com), Google searches, co-workers, etc) and come up with the check-list of the specific steps _your\_environment_ needs to have done. (For instance, there are 100’s of “DNS” servers that could be in use - there is not a single answer for all of them.)

You need to perform additional research. Once you can perform these tasks manually yourself and have those steps written down as a reference, review the “win\_XXXX” Ansible modules to look for ones that apply. Once you’re stuck there, come back and we can help you with individual tasks from your list that you are stuck with.

Sorry, but your questions aren’t Ansible related at this point.

---

<div class="post-metadata">

**Author:** ![PRAVEEN\_KATTULAPALLI](https://avatars.discourse-cdn.com/v4/letter/p/e79b87/32.png) [@PRAVEEN\_KATTULAPALLI](https://forum.ansible.com/u/PRAVEEN_KATTULAPALLI)\
**Post date:** [September 24, 2020, 2:07am UTC](https://forum.ansible.com/t/unistall-windows-server/33865/14 "2020-09-24T02:07:26Z")

</div>

I am sorry,

But Firstly thanks for your help, Yes  
I started performing some sub tasks manually. Soon i will try to implement them from ansible. If I struck anywhere i will reach you…

Thank you…
