• Thanks a lot Greg. This script is really helpful.

    Correct me If I am wrong.

    My situation is I want to restrict group of accounts which can login from some applications but not from SSMS / Excel / DBArtisan / .....

    As suggested by you the sql service account can be added to the [BlackList] with [RestrictionEnabled] to zero to avoid rollback right ?

    Please Advise.

    Thanks & Regards,

    Srini