Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In the CLI itself

$foo = (Get-ADGroupMembers -identity"blah_SEC")
echo $foo


But when I do the same exact thing in a .ps1 file it says the parameters are missing and prompts me to input them.

share|improve this question
I don't know why you're getting a "missing parameter" error. You should actually be getting a bit worse. Firstly, you'll get a "command not found" type of error - the command is Get-ADGroupmember, not Get-ADGroupMembers. After that, you should get a "cannot find an object with identity:" error because there's no space between -Identity and "blah_SEC". After you fix that in your script, try putting a semicolon at the end of the first line for good measure and see if it works. –  Iszi 2 days ago

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.