ticketmaster / poshspec

Infrastructure Testing DSL running in Pester
MIT License
183 stars 32 forks source link

Additional Test: UserRightsAssignment #35

Closed michaeltlombardi closed 7 years ago

michaeltlombardi commented 8 years ago

When validating the security configuration of a server it is often necessary to test whether or not a particular account has certain user rights assigned to it or whether a particular user right is assigned to specific users.

We require a flexible implementation that will allow operators to write tests that test either for accounts or for user rights.

Example

UserRightsAssignment ByAccount "BUILTIN\Users" { Should Not Match "SeServiceLogonRight" }
UserRightsAssignment ByRight "SeDebugPrivilege" { Should Be "BUILTIN\Administrators" }