Get-CimInstance -ClassName win32_service | Select Name,State,PathName | Where-Object {$_.State -like 'Running'}

Untitled

winPEAS.exe servicesinfo

Untitled

The icacls utility outputs the corresponding principals and their permission mask.4 The most relevant permissions and their masks are listed below:

MASK PERMISSIONS
F Full access
M Modify access
RX Read and execute access
R Read-only access
W Write-only access

icacls permissions mask

Let's use icacls on the Apache binary BetaServ.exe first.

Untitled

Check the Startup Type of the mysql service with the help of the Get-CimInstance Cmdlet by selecting Name and StartMode as well as filter for the string "BetaService" with Where-Object.

Get-CimInstance -ClassName win32_service | Select Name, StartMode | Where-Object {$_.Name -like 'BetaService'}

Untitled