Skip to main content

Questions tagged [powershell]

Windows PowerShell is a command line shell and scripting language for Windows that supersedes the CMD.exe shell and batch language. PowerShell is also an automation engine for Windows that provides functionality similar to Windows Script Host and VBScript.

Filter by
Sorted by
Tagged with
3 votes
0 answers
35 views

I have set up some right-click context menu entries for .ps1 files to run PowerShell scripts in Windows Terminal instead of ConHost. Screenshot: So I can run a one-off script elevated or un-elevated ...
fmotion1's user avatar
  • 247
1 vote
1 answer
28 views

I'm trying to set up virtual env for pytest using pycharm which is using powershell for the terminal and the activate.bat is not recognized and neither is the .\activate.bat it suggests
Robbie's user avatar
  • 11
-1 votes
2 answers
55 views

I am trying to create a powershell script as I work for a small IT company and in the script I want to edit alot of windows settings in personalization, Privacy & Security, System, and Apps. Also ...
Brendan O's user avatar
1 vote
1 answer
40 views

I needed to update some drivers on some Win11 installation thumb drives we have. These were made via the Media Creation Tool from MS so, these aren't some fancy homemade images. The thumb drives ...
RKillcrazy's user avatar
-1 votes
1 answer
102 views

I seek an Execution Policy which requires local scripts to be signed, and prevent downloaded scripts from being executed. The goal is to disallow unapproved execution of downloaded scripts, and to ...
johny why's user avatar
  • 460
1 vote
1 answer
51 views

I'm using the powershell terminal on VS Code. I fullscreen the terminal because I can see more stuff that way. The text of the terminal moves upward after closing and reopening, but the terminal ...
thoxbox's user avatar
  • 41
1 vote
1 answer
114 views

I have a Windows 10 Enterprise LTSC device to which I need to connect and disconnect different USB devices. I can hear the sound of connect/disconnect and I can see the USB device appear/disappear ...
slybloty's user avatar
  • 525
2 votes
0 answers
177 views

A long time ago, the office changed our Network Profile to be stored on a file server, rather than locally (makes complete sense), so they're now in a path along the lines of \\<Domain>.local\...
Larnu's user avatar
  • 633
2 votes
1 answer
186 views

I tried to get around the user prompt when installing a distro via wsl --install Ubuntu --name MyUbuntu --user root. I need this to script the creation of the distro in PowerShell. Sadly, option --...
Patrick Fromberg's user avatar
6 votes
2 answers
838 views

Whenever I double click a ps1 file, it opens in NotePad. If I right click it, then click "Run with PowerShell", Windows will run it using the Windows Powershell (the one with the blue app ...
Jonathan Levi's user avatar
0 votes
0 answers
84 views

This question is the follow up question for this answer: https://superuser.com/a/897645/3054995 Does Windows executes the first discovered executable with typed name, or last discovered executable? e....
Yaohua Zhuo's user avatar
0 votes
0 answers
134 views

I’m on Windows (11, 64-bit). Whenever I try to open PowerShell (either through Windows Terminal, VS Code terminal, or directly from Start → PowerShell), it immediately closes with the following ...
Ammar Ahmed Siddiqui's user avatar
2 votes
0 answers
159 views

I am running Windows 10 Pro off a Lenovo P51 Thinkpad (i7-7820HQ 4C8T). I am trying to get the maximum boost clock speed of my CPU by using wmic cpu get maxclockspeed in the cmd. It outputs: ...
Lord Porkchop's user avatar
0 votes
3 answers
905 views

I need to learn serial number of a computer. How can I do this with PowerShell. I was using wmic bios get serialnumber but its deprecated and removed on windows 11.
mustafa candan's user avatar
0 votes
0 answers
167 views

I have created simple GUI using PowerShell to search for a file and move the file if necessary. The files are sensitive and in prod location ,hence local user will not have access to file location. ...
user2027720's user avatar
3 votes
1 answer
237 views

ChatGPT told me that I can see tokenGroups of a user with PowerShell command like this: Get-ADUser <username> -Properties tokenGroups | Select-Object -ExpandProperty tokenGroups but when I try ...
Alexey Starinsky's user avatar
1 vote
0 answers
178 views

We are currently in the process of moving from Windows 10 22H2/Windows 11 23H2 to Windows 11 24H2. One of my scripts relies on get-appxpackage for tracking version numbers. On any client with a ...
bvdo's user avatar
  • 21
3 votes
1 answer
365 views

I don't know if my RAM is soldered. I tried running the following command in PowerShell: Get-WmiObject Win32_PhysicalMemory | Select-Object DeviceLocator And it shows the following: DeviceLocator ----...
Davidis21's user avatar
0 votes
0 answers
138 views

I'm working on a PowerShell script to query all active firewall rules on a domain-joined Windows Server 2022 Core machine. The command I'm using is: Get-NetFirewallRule | Where-Object {$_.Enabled -eq &...
Steven's user avatar
  • 9
0 votes
1 answer
111 views

I need to establish trust for ASP.NET Core HTTPS development certificate. I tried dotnet dev-certs https --trust and $output = dotnet dev-certs https --check | Out-String $thumbprint = [Regex]::...
Yola's user avatar
  • 121
1 vote
1 answer
130 views

This guide details a simple fix for devices with improperly configured certificates which involves downloading a root certificate list from Windows Update and then importing it: There is a manual way ...
seagull's user avatar
  • 6,262
1 vote
1 answer
298 views

In scheduled tasks for windows there is a folder called Microsoft which contain shared tasks that seem to be visible for all users. I would like to have my own folder that with tasks that are visible ...
Lawrence Kok's user avatar
2 votes
1 answer
255 views

I'm using Windows 11 24H2 Professional. When I click "Open PowerShell window here" in the Explorer context menu with Shift held down, it always fails for directories with whitespaces. The ...
Frank Yang's user avatar
1 vote
1 answer
81 views

I am trying to run a very basic powershell script that should be sending an 'Enter' keypress to the top-most window to close a pop-up. I made sure to change the ExecutionPolicy to "RemoteSigned&...
DemonstrationsExport's user avatar
8 votes
1 answer
1k views

Preamble I am trying to ascertain the platform-type of an EXE and I cannot reconcile what I'm seeing with any known source. I have a bit of PowerShell which reads the first 30 characters of an EXE as ...
seagull's user avatar
  • 6,262

1
2 3 4 5
123