r/PowerShell • u/Chvrromais • Mar 03 '26
Im stuck on this command new-adgroup
Im taking Information technology and networking in college and Im stuck trying to do this command and I asked the teacher and he’s saying what specific ps command am I using what do I tell him? and here’s the full command
new-adgroup -name "IT_Interns" -groupcategory security -groupscope global
and then this pops up
new-adgroup: Unable to find a default server with Active Directory Web Services running.
At line:1 char:1
+ new-adgroup -name "IT_Interns -groupcategory security -groupscope gi ...
+ CategoryInfo
: ResourceUnavailable: (:) [New-ADGroup], ADServerDownException
+ FullyQualifiedErrorId : ActiveDirectoryServer:1355,Microsoft.ActiveDirectory-Management.Commands .NewADGroup
7
u/AppIdentityGuy Mar 03 '26
Is the computer you are using AD joined?
1
u/[deleted] Mar 03 '26
So i cheated and read some others but just based on your error, there is no domain controller so you're not connected to AD. Can't run an AD command if there is no AD
1
u/jimb2 Mar 04 '26
You will also need specify where the group goes with the path parameter. There may be other stuff you want to add like a mail address. The sane way to do this is with a splat, not a huge line of code. Search: powershell splatting.
1
u/blop135 Mar 04 '26
You’ll need to to specify the OU also. The port TCP 9389 must be open between your computer and the domain controllers of your domain. To find out the name of your domain controllers (Get-ADDomain -Server Yourdomain).ReplicaDirectoryServers
1
u/[deleted] Mar 03 '26
[removed] — view removed comment