AnsweredAssumed Answered

Setting security in AF using powershell

Question asked by a9woods on Dec 14, 2018
Latest reply on Dec 17, 2018 by a9woods

I am attempting to set the server level security using PowerShelll.

 

I have found a way to manage the PI-AF security configuration with PowerShell scripts for the 2 following cases :

  • at the server level:
    • $AFSecurity = $afSrv.Security
    • $AFSecurity.SetSecurityString($_.SecurityString, $false)
  • at the database level:
    • $AFDb = $afSrv.Databases[$_.DatabaseName]
    • $AFSecurity = $AFDb.Security
    • $AFSecurity.SetSecurityString($_.SecurityString, $false)

 

Then, the config string is updated:

 

But, i didn't found a way to manage other "Items to Configure (Contacts, Notification Contacts Templates, ...):"

I have tried several ways to use AFSecurityItem along with PISystem.GetSecurity(AFSecurityItem.Contact) and AFServer.GetSecurity(AFSecurityItem.Contact) and have not found success. Any ideas on how I can set the security for contacts, Notification Contact Templates, etc?

Outcomes