Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

CMD line to delete domain group from a local machine

$
0
0

I want to delete a domain secuirty group from my local machine. The security group name is XYZ\Desktop Administrator where XYZ is a domain.

I tried to delete it using the command line:

1. net localgroup Administrators XYZ\Desktop Administrator /Delete

it throws following error:

There is no such global user or group: XYZ\Desktop.

There is no such global user or group: Administrator.

2. I changed the command line and tried following:

net localgroup "Administrators" "XYZ\Desktop Administrator"/Delete or net localgroup "Administrators" "Desktop Administrator

The syntax of this command is:

NET LOCALGROUP
[groupname [/COMMENT:"text"]] [/DOMAIN]
              groupname {/ADD [/COMMENT:"text"] | /DELETE}  [/DOMAIN]
              groupname name [...] {/ADD | /DELETE} [/DOMAIN]

Can anyone help how to delete a domain security group name where there is SPACE between first name and last namelike above case. If I use double quote, CMD env throws SYNTAX error and if I dont use double quote, CMD accepts Desktop and Administrator as two different account. Please help.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



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