Skip to main content

All Questions

0 votes
0 answers
65 views

Permissions on specific subfolders with Set-Acl

I have to create a set of folders based on an address list and then configure the permissions in active directory. Creating the folders and subfolders works for me, I adapted a few lines I found ...
Marin's user avatar
  • 1
1 vote
0 answers
75 views

Launch docker container from power shell fail, unexpected behavior?

I have created the following script in powershell for two objectives: read from an .env file the setup of the local urls of my development environment and deploy them to the Windows hosts file. take ...
Francisco IA Lover's user avatar
0 votes
1 answer
760 views

Powershell: Use a string as multiple args

I have a string variable in PowerShell, $t="foo bar" and it should be passed as argument to command 'start-process'. My 'start-process' needs multiple args which is "foo" and "...
Dan D.'s user avatar
  • 731
0 votes
2 answers
1k views

How do I pass an argument from Windows Batch to single Powershell Command?

I know I can pass variables to a powershell script like this: powershell -file ".\filetorun.ps1" "arg1" "arg2" and put param(var1=args[0],var2=args[1]) in the Powershell ...
HTWingNut's user avatar
  • 509
1 vote
1 answer
2k views

Using 7z command Windows 11

I have recently been trying to use 7z in Powershell but seem to be struggling to get it to work. I thought the issue would've just been that I didn't have 7-Zip added to my environment variables, but ...
CadenQ's user avatar
  • 11
0 votes
3 answers
982 views

How to run apps from Windows' command line like in Linux

Context: I use Fedora GNU/Linux as my main OS, but sometimes I need to work within Windows. Over the years, using Linux distros, I have become used to working mainly through the command line, calling ...
Noumeno's user avatar
  • 106
2 votes
0 answers
139 views

Can we make File Explorer accept PowerShell variables?

More and more, PowerShell is the de facto standard scripting language for Windows, and yet, in File Explorer, we are still stuck using DOS variables. e.g., you can type the following into the address ...
YorSubs's user avatar
  • 949
0 votes
1 answer
966 views

How do I start PowerShell from an environment variable?

I can start cmd.exe using the %COMSPEC% environment variable, what is the equivalent for PowerShell?
Alpha Bravo's user avatar
2 votes
1 answer
731 views

How can I make CMD load normal system commands by default? (command prompt / powershell)

Please see below screenshot, this is pretty much self explanatory. All default programs in System32 aren't being loaded and can't run unless I specify the exact directory and path of the program ...
AutoBaker's user avatar
  • 1,775
0 votes
2 answers
637 views

Erased System Path Variables

I was writing a batch file that was supposed to automatically set up a computer to receive "psexec" remote commads. Unluckly i didn't really pay attention to what i was writing and i wrote ...
Xcode's user avatar
  • 1
2 votes
1 answer
1k views

PATH is not being refershed in VS Studio Power shell environment?

I have added MingGW to my path a couple of days ago and I have turned off my computer yet I find that the path has not been refreshed. I currently have a Windows 11 OS. I have to run this command ...
EnlightenedFunky's user avatar
1 vote
2 answers
1k views

get a process's private environment variables in Windows using powershell

I have a process (testxx) running on my Database. Every time a user connects with the database the process will start separate session for. All processes include a private environment variable(Client-...
Keeran's user avatar
  • 135
7 votes
1 answer
23k views

How to get current path in powershell into a variable

(I don't speak English. Hope you understand.) Hi, I have a powershell script(.ps1) and it needs to work with the current path(e.g. "C:\Users\user\Desktop"). I don't know how to set it into a ...
Andrew's user avatar
  • 85
2 votes
2 answers
172 views

Why are there two standards for accessing environment variables in Windows when they call point to the same environment variables?

I can use $env:<env-name> in Powershell to access an environment variable, and in cmd and all other parts of Windows I can use %env-name% to access them. Why is are there two different standards ...
leeand00's user avatar
  • 22.7k
2 votes
0 answers
894 views

Powershell can't see "git" or "node" commands while cmd can

Using Windows 10, I can't run certain commands from PowerShell but they all work correctly using cmd. PowerShell: node --version: node : The term 'node' is not recognized as the name of a cmdlet, ...
Vitaly Senko's user avatar

15 30 50 per page