PoGoMap-GUI icon indicating copy to clipboard operation
PoGoMap-GUI copied to clipboard

No Windows power shell in local group policy editor (gpedit.msc)

Open AsianJew12 opened this issue 9 years ago • 11 comments

I'm having this error `Set-ItemProperty : Cannot find path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' because it does not exist. At line:1 char:1

  • Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\Powe ...
  • - CategoryInfo          : ObjectNotFound: (HKLM:\Software...dows\PowerShell:String) [Set-ItemProperty], ItemNotF 
      oundException
    - FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetItemPropertyCommand`
    
    

and as said at the manual, im supposed to do something at the windows powershell but it doesn't appear in mine, any help?

AsianJew12 avatar Sep 19 '16 03:09 AsianJew12

I would do some google searching on this. Seems like an issue with the PC and not the application. I would do some searching but I'm at work right now ahh =/

Go2Engle avatar Sep 19 '16 12:09 Go2Engle

same here

mykill18 avatar Sep 19 '16 15:09 mykill18

`Set-ItemProperty : Cannot find path 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell' because it does not exist.

You have to create the key manually in registry editor. It's a long process, creating the key is just 1 step of this. Unfortunately I can't explain more now (I have to study for exams) but I'll be back in a few days if your issue won't have been resolved until then.

dr-antivirus avatar Sep 19 '16 16:09 dr-antivirus

Well nevermind Run "regedit"

  • Browse through: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft"
  • Right click on "Microsoft" > New > Key .
  • Name it : PowerShell
  • Right click on "PowerShell" > New > Key .
  • Name it : 1
  • Right click on "1" > New > Key .
  • Name it : ShellIds // which is "shellids" without the capitals
  • Right click on "ShellIds" > New > Key .
  • Name it : Microsoft.PowerShell
  • Right click on "Microsoft.PowerShell" > New > String Value
  • Name it : ExecutionPolicy
  • Double click on "ExecutionPolicy"
  • Set Value data to Unrestricted and save.
  • Restart your pc and try again, tell me if anything changes

(I had to do this, but with many other steps so not sure which step is the one who made PowerShell recognized and unrestricted. By the way I could never see Powershell in gpedit.msc, and I didn't need it. Manually allowing the scripts to run via programming code made the job for me.)

dr-antivirus avatar Sep 19 '16 16:09 dr-antivirus

Awesome find! Is it ok If I close this then? I can reference in the future if anyone else has the issue.

Go2Engle avatar Sep 19 '16 19:09 Go2Engle

It would be better to let the OP give us feedback before closing it. We may need more steps to fix it 100%

dr-antivirus avatar Sep 19 '16 19:09 dr-antivirus

Woops didnt even realize you weren't the OP. My bad.

Go2Engle avatar Sep 19 '16 19:09 Go2Engle

Same issue here, thanks for the help but it didn't resolve my problem,i still got the same error, plus it seems that i dont have "windows powershell" folder in gpedit.msc: Computer Configuration > Administrative Templates > Windows Components > Windows PowerShell

mykill18 avatar Sep 20 '16 18:09 mykill18

Same issue here, thanks for the help but it didn't resolve my problem,i still got the same error, plus it seems that i dont have "windows powershell" folder in gpedit.msc: Computer Configuration > Administrative Templates > Windows Components > Windows PowerShell

Nobody seems to have Powershell in gpedit.msc (including me, but I made it work without needing to edit Powershell in gpedit.msc options) You have to manually allow powershell Scripts to run. After doing what I told you in the previous comment:

  • Open powershell (Windows key > Search > Powershell > Run as Administrator)
  • Copy-paste this (without the brackets): "set-executionpolicy unrestricted"
  • If it asks you for confirmation, answer by [Yes to all]
  • Check if it worked by typing a new command (without the brackets) : "Get-ExecutionPolicy" It will show you a list of "user types" or something (can't remember exactly), all with "unrestricted" next to them I guess.
  • Restart you computer and restart PoGoMap installation, and tell me if it works.

dr-antivirus avatar Sep 20 '16 18:09 dr-antivirus

Thank you very much! it worded!!!

mykill18 avatar Sep 20 '16 22:09 mykill18

Glad it helped :)

dr-antivirus avatar Sep 20 '16 22:09 dr-antivirus