Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

> > Just add the path of the power shell to the environment variable #17698

Closed
owaisishtiaqsiddiqui opened this issue Aug 10, 2024 · 18 comments
Closed
Labels
Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@owaisishtiaqsiddiqui
Copy link

owaisishtiaqsiddiqui commented Aug 10, 2024

          > > Just add the path of the power shell to the environment variable

Thank you. It works! %systemroot%\System32\WindowsPowerShell\v1.0

image

I did this but it does not work for mw

Originally posted by @owaisishtiaqsiddiqui in #6039 (comment)

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Aug 10, 2024
@owaisishtiaqsiddiqui
Copy link
Author

owaisishtiaqsiddiqui commented Aug 10, 2024

I tried to run Windows PowerShell as administrator, it opens but then suddenly closed automatically. Please guide me

@carlos-zamora
Copy link
Member

Can you share a copy of your %USERPROFILE%\Documents\PowerShell\profile.ps1 /?

Can you also provide some more information on what issue you're experiencing? The context is a bit difficult to follow since it's coming from another thread. Thanks!

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. labels Aug 14, 2024
@owaisishtiaqsiddiqui
Copy link
Author

owaisishtiaqsiddiqui commented Aug 19, 2024

@carlos-zamora
I have attached the file.

Can you share a copy of your %USERPROFILE%\Documents\PowerShell\profile.ps1 /?

Can you also provide some more information on what issue you're experiencing? The context is a bit difficult to follow since it's coming from another thread. Thanks!

I have attached a video.

problem.mp4

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. labels Aug 19, 2024
@zadjii-msft
Copy link
Member

Does running powershell normally (not as admin)work for you/?

We're probably still gonna need a copy of your powershell profile. You can find that at:

%USERPROFILE%\Documents\PowerShell\profile.ps1

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Aug 20, 2024
@owaisishtiaqsiddiqui
Copy link
Author

No it opens and then got closed suddenly. This issue is same for (1) if I run it as admin (2) if I run it normally. Let me do the process which you advised me too. Please bear with me.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Aug 20, 2024
@owaisishtiaqsiddiqui
Copy link
Author

@zadjii-msft
looks the path of my PowerShell is: C:\Windows\System32\WindowsPowerShell\v1.0

Attached image is the proof.
screenshot

@DHowett
Copy link
Member

DHowett commented Aug 20, 2024

@zadjii-msft looks the path of my PowerShell is: C:\Windows\System32\WindowsPowerShell\v1.0

Attached image is the proof.

My dude, he is asking you for a copy of a specific file from your computer. We believe you that PowerShell is installed. We think you have a configuration that is making PowerShell fail to start.

@owaisishtiaqsiddiqui
Copy link
Author

owaisishtiaqsiddiqui commented Aug 20, 2024

@zadjii-msft looks the path of my PowerShell is: C:\Windows\System32\WindowsPowerShell\v1.0
Attached image is the proof.

My dude, he is asking you for a copy of a specific file from your computer. We believe you that PowerShell is installed. We think you have a configuration that is making PowerShell fail to start.
@DHowett
I don't know what to do with this "%USERPROFILE%\Documents\PowerShell\profile.ps1" but there is no such folder of file that exits on this path.
but in the attached picture i tried searching the file, so if this is what he is asking for? please tell

1

@DHowett
Copy link
Member

DHowett commented Aug 20, 2024

Thank you, that is very helpful information.

Can you try these two things, separately?

  1. Change the Windows PowerShell profile to "never automatically close"? This will help us determine if there is a message being displayed before it exits.

Image

Image

Image

  1. Change the commandline to include -noprofile

Image

@owaisishtiaqsiddiqui
Copy link
Author

@DHowett are you referring to this?

1

@DHowett
Copy link
Member

DHowett commented Aug 20, 2024

No. I gave you screenshots of what I was referring to.

@DHowett
Copy link
Member

DHowett commented Aug 20, 2024

I see in your video that you are reporting a bug with Windows Powershell outside of Windows Terminal. I am sorry.

Can you open the Run dialog with Windows+R, and run powershell -noprofile?

I see that you are using some sort of education software. I wonder if it is "locked down."

@owaisishtiaqsiddiqui
Copy link
Author

owaisishtiaqsiddiqui commented Aug 20, 2024

@DHowett Here I posted the video and screenshot of the error that shows up in the PowerShell.

PXL_20240820_163707236.mp4

Screenshot_20240820-213751

@DHowett
Copy link
Member

DHowett commented Aug 20, 2024

Thank you.

That error corresponds with "file not found."

Your Windows installation is damaged. Please run sfc /scannow and consider reinstalling Windows.

@owaisishtiaqsiddiqui
Copy link
Author

Damn, that was what i fear the most, and it comes.
Thank you very much.

@owaisishtiaqsiddiqui
Copy link
Author

The issue caused has been addressed and specific guidelines have been given by @DHowett. Thank you for sparing your precious time to address my problem.

@DHowett
Copy link
Member

DHowett commented Aug 20, 2024

Thanks! I am sorry that it was complicated. 🙂

@owaisishtiaqsiddiqui
Copy link
Author

Thanks! I am sorry that it was complicated. 🙂

No problem, actually this issue arises when I installed Git Desktop app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

4 participants