Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey
Filter by
Sorted by
Tagged with
3 votes
1 answer
42 views

Can't seems to find why generic interface types are allowed in powershell class argument attributes, but they can't accept anything - powershell class type resolution doesn't work in this case. Is ...
Zedarc7's user avatar
  • 33
4 votes
2 answers
101 views

Is there a way to configure PowerShell so that the redirection operator (>) automatically creates any missing parent directories? For example, the following command fails if c:\missing_dir\ does ...
Daniel Aviv's user avatar
3 votes
1 answer
79 views

I have a .accdb front-end, and a .mdb backend. I am opening the Front-End as a COM object via PowerShell ... $accessApp = New-Object -ComObject Access.Application $accessApp.OpenCurrentDatabase($...
Phil's user avatar
  • 93
Tooling
1 vote
0 replies
39 views

I’m looking for guidance on how to properly block PowerShell execution on a Windows 11 multi-session Azure VDI. Scenario: The VM has only one local user who logs in directly to the desktop. All ...
PRATEEK GUPTA's user avatar
0 votes
0 answers
54 views

I recently noticed a WindowsPowerShell folder in my Documents folder. I deleted it, but it comes back after each startup. Please, could you help me get rid of this folder? For context, I do not use / ...
Sylvain Mons's user avatar
-3 votes
1 answer
90 views

I'm using GitHub CLI and PowerShell, and I want to list all branches from every repository under a specific GitHub username. gh repo list only returns the repo names, but I want a way to loop through ...
Charan Munur's user avatar
Advice
1 vote
12 replies
135 views

Say I have a combination of the following: # This is a [string[]] type $A = [string[]]@("Aasdf","Casdf","Basdfs") # This is a [string] type $B = "Dasdfs" # This ...
Appleoddity's user avatar
  • 1,281
-2 votes
0 answers
47 views

What I'm trying - I'm trying to flash Windows from within Windows. For this, I am trying to create a WinPE and other partitions from within OS to boot into it. I try to shrink the largest partition to ...
scorpi03's user avatar
1 vote
0 answers
74 views

I'm following along with this tutorial: https://www.youtube.com/watch?v=PHsC_t0j1dU&t=740s As shown in the video at timestamp 1:29:09, when the person runs docker compose up in their terminal, ...
MrVoidAthlete's user avatar
0 votes
1 answer
97 views

In PowerShell, if I do: dir I get a listing with color. However, if I do: PowerShell -Command "dir" there is no color. Is there a way to do PowerShell -Command "dir" and have it ...
dharmatech's user avatar
  • 9,729
Advice
1 vote
2 replies
54 views

runas /user:someuser /profile cmd Starts cmd.exe as someuser and that user's environment. E.g. inside cmd.exe >echo %USERNAME% someuser However, when I am trying to do a similar thing from ...
LOST's user avatar
  • 3,372
3 votes
1 answer
98 views

Why does redirecting stderr to stdout, when launching an external program from PowerShell, turn unicode characters into their code point representation? For example: PS > py -3.13 -c "import ...
sparrowt's user avatar
  • 3,099
0 votes
1 answer
61 views

I am provisioning Windows 2022 EC2 instances using Terraform and a PowerShell User Data script. I want to add functionality where this User Data script will configure a shutdown PowerShell script ...
Brian G's user avatar
  • 418
1 vote
2 answers
123 views

I know I can have multiple commands in a script block when the commands are specified at script block creation time: $sb_both = { echo 1 echo 2 } & $sb_both # returns: # 1 # 2 But after ...
john v kumpf's user avatar
3 votes
1 answer
115 views

I saw in a script this kind of command: Write-Verbose -Message ($var=$null="foo=$(<some computation>)") <do something more with $var> What is the point of assigning the string ...
Peyre's user avatar
  • 665

15 30 50 per page
1
2 3 4 5
7951