Powershell COM+ settings

后端 未结 2 1654
轻奢々
轻奢々 2021-01-05 20:15

I\'m trying to set the following values with the powershell COMAdmin.COMAdminCatalog but I can\'t find the setting for the below in red. Any help would be appreciated.

2条回答
  •  北海茫月
    2021-01-05 20:49

    For the properties in question see the Authentication property and the AccessLevelChecks property for the Applications Collection under COM+ Administration Collections.

    For a VBScript example on how to set the Authentication Level property see the answer to changing existing COM+ applications identity via vbs script.

    It should be fairly straight forward to convert to PowerShell. Here's my guess:

    $comAdmin = New-Object -comobject COMAdmin.COMAdminCatalog
    $apps = $comAdmin.GetCollection("Applications")
    $apps.Populate();
    $app = $apps | Where-Object {$_.Name -eq "MyAppName"}
    
    # Set Authentication to Packet Authentication
    $app.Value("Authentication") = 4 
    
    # Set Security Level to Process and Component level
    $app.Value("AccessChecksLevel") = 1 
    
    $apps.SaveChanges()
    

提交回复
热议问题