gland2015

Results 21 comments of gland2015

小伙子来试试我这个编辑器,开箱即用,功能强大[https://github.com/gland2015/gland](https://github.com/gland2015/gland),快来颗star

yes, it works well in my standalone PowerShell. but in windows services program has any difference? c# call powershell: https://docs.microsoft.com/en-us/powershell/scripting/developer/hosting/adding-and-invoking-commands?view=powershell-7.1

it is SYSTEM account, use Adminstrators account is same. I add SYSTEM to wmi -> ROOT ( wmimgmt.msc) is same. Get-Disk / Mount-Disk / Get-Volume is work at windows service.

@jborean93 yes, This returns disk information, so Get-PhysicalDisk has bug.

@jborean93 Get-PhysicalDisk return nothing, not a error

@jborean93 it using System.Management.Automation API this is some code. using System; using System.Management.Automation; using System.Text.Json; class Shell { static PowerShell ps = PowerShell.Create(); public static void Init() { ps.AddScript("Set-ExecutionPolicy -ExecutionPolicy...

`[ { "CimClass": { "CimSuperClassName": "MSFT_StorageObject", "CimSuperClass": { "CimSuperClassName": null, "CimSuperClass": null, "CimClassProperties": [ { "Name": "ObjectId", "Value": null, "CimType": 14, "Flags": "Property, Key, Required, ReadOnly, NullValue", "Qualifiers": [ {...

your windows service is ok? There are many error here. @jborean93

so why it return nothing? when it is a ordinary program, it is work. when it is windows service, it not work. @jborean93