Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Deleting/resetting a computer object remotely using PowerShell?

$
0
0

We have several computer labs, each with about 25 computers. We sometimes need to re-image the computers. The computers automatically add themselves to the domain using PowerShell.

The problem is that the computer object already exists in Active Directory if the computer has already been imaged. We ask our domain administrator to delete the computer objects before imaging, but that is annoying for him and for us.

Here are my questions:

  1. Currently, we have a domain user account that has the ability to add computers to the domain. Is there a permission that could be added to also allow the user account to delete computer objects?
  2. If the answer to the above question is "yes," then can PowerShell use that domain user account to delete the computer account? Is there something like a "Delete-ComputerObject" cmdlet?

Ideally, we would like this:

1....


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>