lazywinadmin / Monitor-ADGroupMembership

PowerShell script to monitor Active Directory groups and send an email when someone is changing the membership
MIT License
264 stars 61 forks source link

SearchScope parameter error #25

Open EddieKnight1 opened 6 years ago

EddieKnight1 commented 6 years ago

When adding the -SearchScope parameter with any of the available options (Base, OneLevel or Subtree), powershell returns the following error:

Monitor-ADGroupMemberShip.ps1 : Parameter set cannot be resolved using the specified named parameters. At line:1 char:1

lazywinadmin commented 6 years ago

Can you share the full command that you use ?

-SearchScope only works with Organizational unit parameters, see this line: https://github.com/lazywinadmin/Monitor-ADGroupMembership/blob/master/Monitor-ADGroupMemberShip.ps1#L285

So it might be related to that.