2

Keep getting "The Paramater is Incorrect". I think I'm following Microsoft's method correctly, but it's not working.

New-ADGroup -DisplayName $name -Name $grpName -Server server.org `
  -Path:'DC=server,DC=org' -GroupCategory Distribution `
  -GroupScope DomainLocal -Description $desc `
  -OtherAttributes @{'mail'=$email;'gidNumber'=$gid}}

The Microsoft page shows you need to use the semi-colon to separate values, so I'm using

  -OtherAttributes @{'mail'=$email;'gidNumber'=$gid}}

Is this wrong? Without the gidNumber it works fine.

Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129
user3413377
  • 21
  • 1
  • 3

1 Answers1

0

I had no problem with gidNumber in otherAttribues w/ multiple attributes, except that I needed to specify group scope. - try specify group scope too - using a newer version of powershell - make sure your $gid is valid (not out of range etc.)

strongline
  • 620
  • 3
  • 10