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

Closed
opened 2026-01-31 08:02:55 +00:00 by claunia · 18 comments
Owner

Originally created by @owaisishtiaqsiddiqui on GitHub (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 https://github.com/microsoft/terminal/issues/6039#issuecomment-2119349027

Originally created by @owaisishtiaqsiddiqui on GitHub (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](https://user-images.githubusercontent.com/18193764/82724371-d0afd800-9cff-11ea-874f-da75172fc889.png) I did this but it does not work for mw _Originally posted by @owaisishtiaqsiddiqui in https://github.com/microsoft/terminal/issues/6039#issuecomment-2119349027_
claunia added the Needs-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 08:02:55 +00:00
Author
Owner

@owaisishtiaqsiddiqui commented on GitHub (Aug 10, 2024):

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

@owaisishtiaqsiddiqui commented on GitHub (Aug 10, 2024): I tried to run Windows PowerShell as administrator, it opens but then suddenly closed automatically. Please guide me
Author
Owner

@carlos-zamora commented on GitHub (Aug 14, 2024):

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!

@carlos-zamora commented on GitHub (Aug 14, 2024): 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!
Author
Owner

@owaisishtiaqsiddiqui commented on GitHub (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.

https://github.com/user-attachments/assets/bec7e7ab-732f-4795-8a19-e199a7e1da6a

@owaisishtiaqsiddiqui commented on GitHub (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. https://github.com/user-attachments/assets/bec7e7ab-732f-4795-8a19-e199a7e1da6a
Author
Owner

@zadjii-msft commented on GitHub (Aug 20, 2024):

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
@zadjii-msft commented on GitHub (Aug 20, 2024): 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 ```
Author
Owner

@owaisishtiaqsiddiqui commented on GitHub (Aug 20, 2024):

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.

@owaisishtiaqsiddiqui commented on GitHub (Aug 20, 2024): 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.
Author
Owner

@owaisishtiaqsiddiqui commented on GitHub (Aug 20, 2024):

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

Attached image is the proof.
screenshot

@owaisishtiaqsiddiqui commented on GitHub (Aug 20, 2024): @zadjii-msft looks the path of my PowerShell is: C:\Windows\System32\WindowsPowerShell\v1.0 Attached image is the proof. ![screenshot](https://github.com/user-attachments/assets/9b4e9e77-2101-4b31-b97e-8f1bfd6d1643)
Author
Owner

@DHowett commented on GitHub (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 commented on GitHub (Aug 20, 2024): > [@zadjii-msft](https://github.com/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.
Author
Owner

@owaisishtiaqsiddiqui commented on GitHub (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

@owaisishtiaqsiddiqui commented on GitHub (Aug 20, 2024): > > [@zadjii-msft](https://github.com/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](https://github.com/user-attachments/assets/f1f5c390-89b6-4ce6-a552-07b9233fda03)
Author
Owner

@DHowett commented on GitHub (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

@DHowett commented on GitHub (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](https://github.com/user-attachments/assets/642ef249-dd48-45ee-9464-1d3f8ce4f581) ![Image](https://github.com/user-attachments/assets/6770fb83-72d8-4a04-8119-5b349d657f27) ![Image](https://github.com/user-attachments/assets/d38dfbae-6f95-46e1-a632-227df2a0002d) 2. Change the `commandline` to include `-noprofile` ![Image](https://github.com/user-attachments/assets/b0496256-f770-4d73-be97-6c88b905b013)
Author
Owner

@owaisishtiaqsiddiqui commented on GitHub (Aug 20, 2024):

@DHowett are you referring to this?

1

@owaisishtiaqsiddiqui commented on GitHub (Aug 20, 2024): @DHowett are you referring to this? ![1](https://github.com/user-attachments/assets/f10d5413-ad77-4118-abba-6af00b57eaa8)
Author
Owner

@DHowett commented on GitHub (Aug 20, 2024):

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

@DHowett commented on GitHub (Aug 20, 2024): No. I gave you screenshots of what I was referring to.
Author
Owner

@DHowett commented on GitHub (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."

@DHowett commented on GitHub (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 <kbd>Windows+R</kbd>, and run `powershell -noprofile`? I see that you are using some sort of education software. I wonder if it is "locked down."
Author
Owner

@owaisishtiaqsiddiqui commented on GitHub (Aug 20, 2024):

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

https://github.com/user-attachments/assets/b985455e-b1a2-4cf8-803f-6906b68384be

Screenshot_20240820-213751

@owaisishtiaqsiddiqui commented on GitHub (Aug 20, 2024): @DHowett Here I posted the video and screenshot of the error that shows up in the PowerShell. https://github.com/user-attachments/assets/b985455e-b1a2-4cf8-803f-6906b68384be ![Screenshot_20240820-213751](https://github.com/user-attachments/assets/8c73eb01-7492-4236-a635-b73594bc1433)
Author
Owner

@DHowett commented on GitHub (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.

@DHowett commented on GitHub (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.
Author
Owner

@owaisishtiaqsiddiqui commented on GitHub (Aug 20, 2024):

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

@owaisishtiaqsiddiqui commented on GitHub (Aug 20, 2024): Damn, that was what i fear the most, and it comes. Thank you very much.
Author
Owner

@owaisishtiaqsiddiqui commented on GitHub (Aug 20, 2024):

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.

@owaisishtiaqsiddiqui commented on GitHub (Aug 20, 2024): 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.
Author
Owner

@DHowett commented on GitHub (Aug 20, 2024):

Thanks! I am sorry that it was complicated. 🙂

@DHowett commented on GitHub (Aug 20, 2024): Thanks! I am sorry that it was complicated. 🙂
Author
Owner

@owaisishtiaqsiddiqui commented on GitHub (Aug 20, 2024):

Thanks! I am sorry that it was complicated. 🙂

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

@owaisishtiaqsiddiqui commented on GitHub (Aug 20, 2024): > Thanks! I am sorry that it was complicated. 🙂 No problem, actually this issue arises when I installed Git Desktop app
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22081