All Questions
Tagged with windows-10 powershell
860
questions
18
votes
4
answers
15k
views
How do I disable the message "Try the new cross-platform PowerShell" message when running Powershell after latest windows update
Since the latest Windows 10 update, when opening Powershell I get the message "Try the new cross-platform PowerShell https://aka.ms/pscore6".
I would like to turn that notification off. Any ideas?
39
votes
4
answers
62k
views
Is it possible to update the built-in OpenSSH Client in Windows 10?
I'm experiencing certain issues with the built-in OpenSSH client that, according to the Win32-OpenSSH Github page, seem resolved in newer versions. The newest version is v7.9 while the preinstalled ...
0
votes
0
answers
27
views
Does the term "virtual desktop" mean separate things on Windows 10 compared to Azure?
I'm trying to learn how to programmatically control the Windows 10 Virtual Deskop. I've found this library but it's taking some time to find documentation/examples of my usecase*. Most of what I find ...
6
votes
3
answers
8k
views
Update Windows "host" File With WSL IP On Start Up
I'm using WSL2 on Windows 10.
My distro is Debian.
I wanted to set a static IP for my distro, but I found out that it can't be done for WSL from this answer.
However I figured out that there could be ...
0
votes
0
answers
12
views
PowerShell Set-ItemProperty LastWriteTime incorrect locale [duplicate]
I am running a powershell script:
sp -Path "c:\myfile.txt" -Name LastWriteTime 01/12/2020
It works, but it interprets the date "01/12/2020" as 12th of January 2020, eg MM/DD/YYYY, ...
0
votes
1
answer
2k
views
List Windows Printer 'Printing Defaults' Configuration
How can I programmatically retrieve and display property values from a printer's Printing Defaults settings?
I can successfully retrieve property values from a printer's Preferences using PowerShell, ...
4
votes
4
answers
40k
views
How to retrieve Windows Defender exclusions by PowerShell without truncation output
I want to write a PowerShell Script that displays all exclusions set in Windows Defender in Windows 10. So I already found out that this can be done by calling
Get-MpPreference | Select-Object -...
0
votes
1
answer
877
views
Get Policies from GPO Object in Powershell
How can i get these policies as shown here for example in powershell?
With Get-GPO i can get the Group Policies, but not the Policies inside the group.
0
votes
0
answers
323
views
WINDOWS LOCK SCREEN: Unable to refresh via Commandline
I'm trying to publish a LockScreen company-wide and I was able to achieve it by applying the settings under the registry 'HKLM:\Software\Policies\Microsoft\Windows\Personalization' and it worked as ...
2
votes
2
answers
1k
views
Cannot open Powershell script with comma in filename via "context menu » edit"
I noticed that Windows 10 (at least the current stable build 1607) does not properly escape filenames when you try to open a PowerShell script (.ps1) via context menu » Edit.
While ampersand and ...
24
votes
4
answers
21k
views
Configure Windows Creators Update Night Light via Registry
How can the new Night Light feature in Windows 10 (Pro) Creators Update be configured via the registry?
I'd like to auto configure new/updated installations when using my configuration management ...
3
votes
1
answer
1k
views
sftp with wsl as default OpenSSH shell on Windows 10
On Windows 10 I can set the default OpenSSH shell to be wsl with the following PowerShell command.
New-ItemProperty `
-Path "HKLM:\SOFTWARE\OpenSSH" `
-Name DefaultShell `
-Value "C:\...
4
votes
1
answer
1k
views
"open windows powershell" not working from windows 10 file explorer
Not sure what happened, but when I open windows 10 file explorer and goto the menu:
File->Open Windows PowerShell->Open Windows Powershell
Then it doesn't do anything. Meaning it doesn't ...
1
vote
2
answers
3k
views
uninstall a non-win32 software silently using PowerShell
My company installs a bunch of unnecessary software on my operating system which I really don't like and they cause quite some trouble for me. consider the software foobar that shows up in the list of ...
0
votes
0
answers
175
views
Win10 Powershell. Powershell scripts won't run since update to 7
A previous question involved my using Winget to upgrade powershell from 5.1 to 7.x. As I understand it, I now have them side by side. But I have a new issue. I had been experimenting with scripts to ...
1
vote
0
answers
1k
views
If Shell Launcher isn't available on Windows 10 Pro, why is there an option to activate it on "Turn Windows Features On or Off"?
I'm trying to set up a kiosk with a custom .exe as shell, and I'm aware that Shell Launcher is only available on Win10 Enterprise and Education, but even though I'm using a Pro version, I can still ...
1
vote
2
answers
2k
views
"Open PowerShell window here" gives "Application not found" error although `powershell.exe` should be find-able in `PATH`
Windows 10 22H2 19045.3086
With Shift + Right-click, I get a "Open PowerShell window here" entry in the context menu. I think I didn't manually add this entry, it's either enabled by some ...
2
votes
1
answer
1k
views
Obtaining RAM usage per logon session in PowerShell
I want to get the memory used per session through a PowerShell function. I am only interested in disconnected sessions. In the task manager, I can see the memory used per sessionID:
I tried to obtain ...
0
votes
0
answers
297
views
Search Windows 10 directory for subfolders and files with common words in their names without specifying the words
Hard to explain! Please bear with me...
I rip my vinyl record collection to MP3 format. Each album gets its own folder. The naming standard I use for each album folder is "Artist - Album".
...
3
votes
0
answers
105
views
Get-NetAdapter ghost interfaces
When I run Get-NetAdapter it shows me a bunch of adapters which are not seen anywhere else in the system, something like:
Mobile network 11 HP hs3210 HSPA+ Mobile Broadband Device 37 Not ...
0
votes
2
answers
1k
views
Next desktop background by cmd, Powershell or batch?
I have set slideshow as my Windows 10 background. I can right click on the desktop and select Next desktop background to change it to the next image. Is there any way to do this via cmd or powershell ...
1
vote
0
answers
3k
views
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-...
6
votes
3
answers
29k
views
Always Run PowerShell ISE As Admin
I have Windows 10 and run some PowerShell commands through the Outlook COM object. This requires PowerShell to be running the same level of access (running as admin or user) as Outlook.
As I need ...
2
votes
0
answers
288
views
Any way to automate the Windows XBox Game DVR?
Is there a way to automate screen video recording using the XBox Game DVR (on Windows 10)? I would like to set recording resolution and start/stop recording with something like Powershell.
1
vote
0
answers
311
views
Copying Specific Subfolder from Multiple Top Level Folders to a Network Path
I have multiple top level folders (about 30) with one particular subfolder I need to copy to another network path (Windows10).
I am trying to see if there is a script or PowerShell command that will ...
9
votes
1
answer
37k
views
Windows 10 Start Menu not showing all shortcuts? [duplicate]
Before someone calls this a duplicate, all the other answers that I've found for this issue claim the problem was fixed in one of the technical previews; however, I'm on the latest version of Windows ...
0
votes
1
answer
153
views
PowerShell falling short on performance when wildcard used multiple times for deleting files matching specific filename patterns
As I mentioned in Q-title, I have put together fairly well-built function for clearing history completely (not keeping any ugly junks or leftovers).
But it seems that due to multiple occurrences of ...
1
vote
1
answer
2k
views
Removing mail accounts from local Windows users via CLI
I am looking for a way to remove linked mail accounts from a local Windows user via a script from the command line, or another way I can reliably schedule.
I'm not talking about a Microsoft account, I'...
0
votes
1
answer
837
views
Windows 10: ssh-ing to a Linux box and getting full xterm-color capabilities?
At the company where I work, we log in to Windows 10, and we do our development work on Linux machines where we connect via ssh login sessions. We have been able to use PuTTY for this up until ...
0
votes
1
answer
2k
views
Powershell in MobaXterm popup terminal
Is it possible to have anything other than bash in the popup terminal (Ctrl + Alt + M) provided by MobaXterm? I would like to have a local powershell instance attached to it.
Even if I start a ...