When I execute the Get-CimInstance command in a Window 2016 Server, it is showing a popup to select "How do you want to open this file?". Screenshot attached. The same command works fine in other servers. How to fix this issue? Is this PowerShell issue? I have the latest version of PowerShell.
Asked
Active
Viewed 139 times
1 Answers
0
I think because it's not running the command that error can be found before the execution in PS. It's not running it and checking with you what to run that command with. Weird that it's doing that. Anyone else use that server or just a lab?
Check the setting where it shows your 'default apps by type'. [.psc1](Windows Powershell Console File) needs to be set to Windows Powershell. [.ps1] should be set to notepad.

R08
- 1
- 1
-
Thanks so much for the response. This is a live system. This is the first time we had to run this command and got this error. Also, I noticed if I import the CimCmdlets module in the PowerShell (Import-Module CimCmdlets) then it works fine. But, when I open a new PowerShell session it fails. Not sure how to make the import a permanent one. Checked the Environment Variables and everything seems to be fine. Any suggestion will be of great help. – user17632237 Dec 13 '21 at 23:08