Questions tagged [powershell-7.0]
17 questions
7
votes
1 answer
How to get GPU usage and GPU memory info of a process by powershell7
I have tried Get-Process and Get-CimInstance Win32_Process to get GPU usage and GPU memory, but both of them can't offer those information.
In Windows Task Manager, it can show GPU memory.
So, is there a way to get those in powershell
bin381
- 173
- 1
- 1
- 5
3
votes
2 answers
Does F7 not work in Powershell 7 to show command history?
In Powershell 5.1, one could press F7 and a history of previous entered commands would show up. I just intalled Powershell 7.2 and F7 no longer does anything. F8 still autocompletes based on command history though.
geronimo
- 133
- 5
2
votes
1 answer
How to let pwsh (powershell 7) use windows terminal color scheme?
I have installed powershell 7, basically pwsh.exe.
When I launch powershell 7 inside Windows Terminal App, it uses Windows Terminal Color Theme profile. But when I launch pwsh.exe separately, it doesn't use the color theme, instead it's using the…
sgon00
- 605
- 2
- 10
- 20
1
vote
1 answer
Change color of PowerShell 7 Get-ChildItem result
I am using PowerShell 7 as terminal in PyCharm and the default colors for the commands were not really clear.
I created a profile.ps1 where I set them in this way:
# Set colours
Set-PSReadLineOption -Colors @{
Command = "`e[30;107m"
Comment…
cicciodevoto
- 113
- 2
1
vote
1 answer
Powershell $env:path changing depending on how it is opened (PowerToys Run)?
I recently started using PowerToys Run and I've noticed that I can no longer use some commands when launching Powershell (7.2.6) via PTR vs just running it out of the start menu.
Turns out, my $env:path is different depending on which way I launch…
Aaron Schultheis
- 113
- 3
1
vote
0 answers
What is the difference between "Run as administrator" and "Run as Administrator"?
There are two (2) "Run as administrator" menu items. The one at the bottom has a PowerShell icon. The bottom one can change console properties such as font and colors. However, the top one (and running as the logged in user) cannot. What is the…
lit
- 879
- 2
- 11
- 27
1
vote
1 answer
Console history single command length limit
I've come to notice, that long multi line commands are not logged to the ConsoleHost_history.txt in PowerShell 7 (unlike in PowerShell 5). How can I change this?
FatalBulletHit
- 363
- 5
- 18
1
vote
1 answer
Windows 10 2004 using powershell-7.0 to update help files
On Windows 10 v2004, within PowerShell 7.0.3 x64, I don't know why it's showing the resource as unavailable:
PS > Update-help -UICulture en-US
Update-Help: Failed to update Help for the module(s) 'ConfigDefender, PSReadline,…
shirish
- 459
- 1
- 6
- 16
0
votes
0 answers
Powershell 7 can't install modules, have to do it manually (Save-Module)
I recently installed Powershell 7.3.5, being "forced" to move away from 5.1 for PnP / SharepointPnP
As an admin, while running it as an admin, regardless of the scope returns :
Install-Package: Administrator rights are required to install…
0
votes
1 answer
Set Powershell Predictive Intellisense Off by default
I'm using Powershell 7.3.3 in Windows 11 and the Predictive Intellisense feature is on by default unless I turn it off manually each time I use it. Is there any way to turn it off (or back on) permanently without setting it each time?
Rich
- 383
- 3
- 10
0
votes
1 answer
Why sfc does not run in Windows PowerShell 7.2.7?
PowerShell 7.2.7
sfc /verifyonly
Windows Resource Protection could not start the repair service.
No problem with running sfc under PowerShell 5 of from cmd.exe
Konstantin Glukhov
- 373
- 2
- 8
0
votes
1 answer
Launching VSCode with Powershell script prevents Powershell from exiting
I'm trying to write a Powershell script that automates setting up my work environment each day. To do this, I have the following two scripts.
Set-Window.ps1
Function Set-Window…
brittenb
- 3
- 5
0
votes
1 answer
Windows Terminal open new tab then launch a script
I use the new windows terminal with Powershell 7.x, my purpose is doing a script in my first tab, launch a new tab from this script and execute a new script into it. Currently I have ma function like this:
function test {
Write-Output 'run my…
Anthony
- 103
- 4
0
votes
1 answer
Can't install oh-my-posh, although I am an admin user?
after configuring my PowerShell and installing Starship.rs, I wanted to install oh-my-posh. The instruction on the website for this is Install-Module oh-my-posh -Scope CurrentUser. I tried this but I get this error every time:
Administrator rights…
Leo1807
- 13
- 4
0
votes
0 answers
Unable to install AzureAD PowerShell Module: Says I need admin rights
I've tried everything I can think to do. I've tried multiple versions of PowerShell. As you can see, I am running it as an administrator. I've tried forcing it for the local user context. I've tried setting the execution policy. I added an exclusion…
THE JOATMON
- 1,878
- 9
- 49
- 81