You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If powershell is disabled by a system admin in an enterprise environment, the System Information npm is failing to output information about:
osinfo.hardware, or osinfo in general
networkinterfaces() returns error
cpu() returns empty errored data
diskLayout() returns empty array
To Reproduce
Steps to reproduce the behavior:
Please disable powershell in your windows machine using link
Search for "How to block PowerShell access using Security Policy" in the link mentioned in point 1.
Once disabled, all the methods that use powershell commands stop working
Current Output
Few methods like osinfo, cpu and diskLayout output error or empty data
Expected behavior
I am not sure if systeminformation is supported on powershell disabled windows machines. But It would be great for me I could read systeminformation on powershell disabled windows machines.
Environment (please complete the following information):
systeminformation package version: 5.10.5
Windows 10 with powershell disabled
The text was updated successfully, but these errors were encountered:
I reproduced the issue.
Package version 5.9.9 is the last one to work in this environment, try to use it.
5.9.10+ does not work anymore. getStaticData() promise does not error nor callback correctly, which made errors handling pretty difficult in this case.
@paragdulam, @CapitaineBidouille ... since wmic is unfortunately dropped in the most recent versions of windows, we had to make the transition to powerShell. See also #616 ... So what I do see as possible solutions:
first checking the error handling (not having powerShell) on my side to get at least no errors.
thinking of having then 2 possible ways of gathering windows system information (wmic as a fallback)
As this would result in a lot of code changes, I am not sure if and when I would be able to do this ...
If it is using power shell internally it still won't work on power shell disabled windows machine. I personally think it is using some core internal api and not power shell
I reproduced the issue. Package version 5.9.9 is the last one to work in this environment, try to use it. 5.9.10+ does not work anymore. getStaticData() promise does not error nor callback correctly, which made errors handling pretty difficult in this case.
Kind regards
Version 5.9.9 was also using powershell commands in it. I downgraded to v4.30.0. This was using wmic commands.
Describe the bug
If powershell is disabled by a system admin in an enterprise environment, the System Information npm is failing to output information about:
osinfo.hardware, or osinfo in general
networkinterfaces() returns error
cpu() returns empty errored data
diskLayout() returns empty array
To Reproduce
Steps to reproduce the behavior:
Current Output
Few methods like osinfo, cpu and diskLayout output error or empty data
Expected behavior
I am not sure if systeminformation is supported on powershell disabled windows machines. But It would be great for me I could read systeminformation on powershell disabled windows machines.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: