Keep getting "The Paramater is Incorrect" I think im following microsofts method correctly but its not working, any help is greatly appriciated.

                    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 seperate values,

so im using

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

is this wrong? without the gidNumber is works fine

  • 1
    Ah.. found that my gID was too long.. :) – user3413377 Aug 13 '15 at 15:47

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.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.