Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Powershell COM+ settings

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.

Value looking to set

Thanks

like image 972
Bruce227 Avatar asked Jun 28 '11 15:06

Bruce227


People also ask

How do I access PowerShell settings?

Open a Command Prompt or Powershell with administrator rights, type start ms-settings: and press Enter. Click the Action Center icon on the Taskbar, then click All Settings.

Where are PowerShell settings stored?

A powershell. config. json file in the $PSHOME directory defines the configuration for all PowerShell sessions running from that PowerShell installation. The $PSHOME location is defined as the same directory as the executing System.

What is a COM object in PowerShell?

ComObject, or plain COM, increases the range of PowerShell activities. One way of looking at COM objects is as a mechanism for PowerShell to launch programs, for example, mimicking the RUN command. Another way of looking at ComObjects is performing the role previously undertaken by VBScript.


1 Answers

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()
like image 186
Randy supports Monica Avatar answered Oct 24 '22 08:10

Randy supports Monica