locked
PBM : Use a Condition against targets with EXECSQL() in it RRS feed

  • Question

  • I am trying to use a condition against targets to ensure that only logins that are in the sysadmin role must require password expiration.  However when I try to use this condition for targets rather than "every" it is not listed.   I even attempted to use sp_syspolicy_add_target_set_level to set it and still no dice, it just leaves it at every.  Does anyone have any experience with doing this, essentially I want to create a dynamic filter for this policy.

     

     

     

     

     

    • Moved by Gavin Campbell Thursday, May 2, 2013 3:46 PM Manageability forum is best for this question
    Thursday, May 2, 2013 1:08 PM

Answers

  • Hi NathanBell,

    You mean that you want to create a target that sysadmin role must require password expiration. Right?

    I just created a condition: facet is login and Expression is @PasswordExpirationEnabled=Ture. Then I created a target. The same as yours. It just show me “every” login.

    I think you could add another Expression in the condition, such as @name, and list all the logins have the sysadmin role in the Value blank.

    Thanks.


    Maggie Luo
    TechNet Community Support

    • Marked as answer by Fanny Liu Thursday, May 16, 2013 7:29 AM
    Tuesday, May 7, 2013 9:21 AM