Skip to main content

All Questions

Tagged with
1 vote
1 answer
2k views

What is the "SSH" equivalent for Windows 10?

I recently had to start managing remote Windows 10 systems (non-servers) and am curious if there is an SSH equivalent for running command prompt commands remotely. Is there a default utility for doing ...
0 votes
1 answer
7k views

Disable sleep, hibernate, and fast startup using PowerShell in Windows 10

Edit: Skip to the end for the result of my situation I am trying to figure out how I disabled the sleep, hibernate, and fast startup options in Windows 10, so that I can include them in the PowerShell ...
1 vote
0 answers
53 views

Raising a dialog window from a Windows .sys driver from the command line?

I would like to allow the user of my application to directly open the (Windows Control Panel) "Internet Protocol Version 4 (TCP/IPv4)" properties dialog (see image below), for a selected ...
-1 votes
4 answers
3k views

Is there a way to open windows terminal shells in the current directory with keyboard shortcuts?

I've Windows Terminal (Preview) pinned to taskbar which I launch using win+t. I'm trying to achieve a similar functionality to alt+f+r inside a directory in file explorer which opens powershell in the ...
0 votes
1 answer
4k views

Is there a way to make Windows Powershell 6 my default terminal?

I downloaded pwsh 6, or pwsh core, and wanted to make it default. Currently whenever I use the shorcut for a CMD, I already get the old pwsh, but I wanted to use the new one instead. Is there anyway ...
1 vote
1 answer
4k views

Turn off 'Close lid to sleep' when only connected to dock/monitor - Windows 10

I want to change the 'Close lid to sleep' setting such that: Whenever my laptop is connected to the dock or monitor, closing lid does nothing When I disconnect it from dock/monitor, closing lid puts ...
1 vote
0 answers
470 views

How do I add a user with "Full Control" permissions to folder without changing owner of the folder (I.E.) Administrators, using the command line?

I want a command-line solution to add a local user account to the permissions table for a directory and grant the account full access... WITHOUT changing the ownership of the directory. I'm looking ...
2 votes
2 answers
453 views

PowerShell equivalent to DISM's /Cleanup-Image in Windows 10

What is the PowerShell equivalent to DISM's /Cleanup-Image in this command: DISM /Image:%mounted_image% /Cleanup-Image /StartComponentCleanup /Resetbase /ScratchDir:%scratch_dir% Within Use DISM in ...
2 votes
2 answers
5k views

Connecting/Disconnecting to Bluetooth Device via CMD, PS, or AHK?

I'm at my wits' end right now. I'm on the latest version of Windows 10 and I just want to run a script to connect/disconnect to my Bluetooth headphones when executed. I've looked at a couple other ...
1 vote
2 answers
1k views

piping command to wsl awk doesn't work

I'm running Windows 10 / WSL2 / Ubuntu 20.04 and am trying to do ifconfig eth0 | grep 'inet ' | awk '{ print $2 }' in PowerShell. Here's what I've come up with: wsl ifconfig eth0 | wsl grep 'inet ' | ...
3 votes
1 answer
9k views

Powershell to set default browser

I created a process using PowerShell to install Chrome. What I am looking to do now is to have PowerShell change the registry for the computer and change the default browser to Chrome. I would ...
9 votes
1 answer
15k views

CTRL+C isn't working as interrupt in command prompt

When I run a command and I wanna to stop it via CTRL+C in CMD or PowerShell nothing happens. If these shells are run with Administrator group CTRL+C is working fine. Yes I have UAC enabled. On ...
2 votes
1 answer
5k views

Adjust the Display scaling settings from PowerShell?

I want to adjust the Display scaling settings of a remote virtual machine via Citrix: (picture from another computer) but I get the error message: ms-settings:displayThis file does not have an app ...
0 votes
1 answer
7k views

Unexpected error when running PowerShell in Windows 10

I am getting an error when I try to run the PowerShell on my Windows 10 machine. Here is the description: Windows PowerShell terminated with the following error: The type initializer for 'System....
0 votes
2 answers
868 views

Add folder to Windows 10 Library programmatically in a batch file or PowerShell

How do I add a folder to a Library (such as Documents, Music, Videos, Pictures) in Windows 10 programmatically using either a batch file command or PowerShell (or indeed a PowerShell command within a ...
2 votes
1 answer
53 views

Is there a PowerShell, Batch, or VBS script that can automatically pin the recycle bin to the start menu?

The recycle bin doesn't show up when you type it into the start menu which seems incredibly moronic. I am able to create a shortcut and pin it to the start menu so it shows up, but I'd like to ...
3 votes
1 answer
1k views

bluetooth profiles in-use on Windows 10

tl;dr how do I list in-use "bluetooth profiles". In Windows 10, I would like a listing of Bluetooth Profiles currently in-use for Bluetooth connected devices. Is there a Powershell command ...
0 votes
1 answer
339 views

Windows Registry Shows Windows 10 Pro Despite Running Windows 11 Pro

My laptop is running on Windows 11 Pro, and the system settings indeed confirm that it's running Windows 11 Pro. However, when I use PowerShell to query the registry for the Windows version powershell ...
6 votes
1 answer
1k views

Error when running the command to create recommended inbound WSL firewall rule for use with IDEA- 'interface not found'?

Intellij IDEA cannot 'see' my WSL java installation. I thought firewall rules could be the culprit. (I've previously been using Kaspersky firewall but recently switched to just using windows defender, ...
1 vote
1 answer
806 views

Windows PowerShell: Get-FileHash and long file paths

OS is Windows 10. I'm using PowerShell's "Get-FileHash" command to generate a file's MD5 checksum directly within its folder, like so: PS Z:\Test> Get-FileHash 'test.txt' -algorithm MD5 ...
0 votes
0 answers
196 views

Importing modules into a remote PC with powershell

I can't find an answer to this issue which I can understand so forgive me if this has already been answered. I'm trying to use self-written modules on a remote PC using Powershell. I would like to use ...
24 votes
9 answers
394k views

How can I reinstall Windows 10's calculator app?

I uninstalled the Calculator app like this in PowerShell: Get-AppxPackage *windowscalculator* | Remove-AppxPackage How do I reinstall it?
12 votes
4 answers
40k views

Import-StartLayout doesn't change anything

I'm trying to create a layout template on Windows 10 using the Export/Import-StartLayout commands. Here's what I've done. Open an admin PowerShell window. Run Export-StartLayout -Path layout.xml. ...
0 votes
2 answers
2k views

Entering cmd into the file explorer address bar not working

I was trying to open an instance of command prompt by typing 'cmd' on the windows explorer's address bar and pressing Enter but nothing happens. Normally, an instance of the command prompt with the ...
9 votes
4 answers
14k views

Eject/dismount a drive using PowerShell

I would like to eject/dismount an external USB drive via PowerShell. Meaning, I want to replicate exactly the behaviour of these UI actions (Ejecting drive via Windows UI): Currently I am using this ...
0 votes
0 answers
2k views

How to know if a computer is being used remotely

Is there a way to know that a computer (win10) is currently being controlled remotely? (via RDP) -And if so, can I know the user-name connected to it? I have several computers that me and my coworkers ...
52 votes
6 answers
56k views

How to maintain ssh-agent login session with Windows 10's new OpenSSH and PowerShell

On my Ubuntu machine, I simply use Keychain to maintain a single ssh-agent which stays logged in. I'd like something similar to that on Windows now that OpenSSH is natively included. I was using Git ...
0 votes
1 answer
525 views

How Can I Change File Explorer's Default View to "Details" and Group by Type Using CMD/Batch or PowerShell?

I'm looking to customize the default settings of File Explorer on my Windows 10 system. Specifically, I want to set the default view mode to "Details" and have files always grouped by "...
0 votes
1 answer
88 views

Is there a way to make an "intelligent" desktop object that filters a specific target folder's children on whether they contain a certain subfolder?

Let's say we have the following folder hierarchy in Windows 10: data acme widgets 2022 2023 2024 gizmos 2023 etc1 etc2 ... etc999 There are ...
4 votes
1 answer
21k views

PsExec error - "Couldn't install PSEXESVC service: Access is denied

I've done a lot of research into this problem and still haven't found a solution. I wrote a powershell script that uses psexec to activate another one on a file share using a p2p network. I keep ...

15 30 50 per page
1
2
3 4 5
29