Skip to main content

Question list filters

Filter by
Sorted by
Tagged with
Score of 3
3 answers
138 views

I'm building a powershell script to uninstall a number of outdated apps from remote computers. I retrieved the uninstallstring from the 64bit Uninstall registry key, replaced some wrong characters and ...
Score of 0
0 answers
151 views

I run a script on my local PC that executes on a remote PC. This script creates a local account on the remote pc and then adds it to the admin group. Then the remote PC reboots, auto logs in with the ...
Score of 0
3 answers
241 views

I'm making an onboarding script and currently having issues with this segment of it: #Switch selector for desired OU of new user (AD) $OUSelector = $null Write-Host "OUs: " $OUSelector = ...
Score of 3
2 answers
232 views

function gethash { param([string]$string = '') if ($string -eq [string]::Empty -or $string -isnot [string]) { Write-Output 'input not valid' } else { (Get-FileHash -Algorithm ...
Score of 1
1 answer
187 views

On Windows, in PowerShell 7.6.6: Get-Help Test-Path gives me this: NAME Test-Path SYNOPSIS Determines whether all elements of a path exist. SYNTAX Test-Path [-Credential <...
Score of 4
1 answer
132 views

I've found this post that explains how to create a new key with a forward slash. That works great if you create new keys, but renaming them doesn't seem to work. Suppose you have this registry key: ...
Score of -3
1 answer
192 views

As a normal user (without administrative privileges), I created a junction on C:\users\john.doe\desktop\john.doe pointing on C:\users\john.doe with the command: New-Item -ItemType junction -path C:\...
Score of 6
3 answers
305 views

Editor's note, to clarify why this question is programming-related: The premise is an existing PowerShell script that aims to implement a Windows service using the appropriate .NET APIs. However, ...
Score of 1
2 answers
233 views

I'm trying to print a subscript character ("₅") to the console, but it shows as "?" when using System.out.println. What I've tried so far: Trying the fixSystemOutEncoding() method ...
Score of 0
1 answer
107 views

We have some of our more sensitive admin accounts into Protected Users in AD. This has a knock on of preventing the Protected Users from renewing Kerberos TGTs beyond their initial mandated four-hour ...
Score of 6
1 answer
259 views

I have a script that may run on different computer but must run at most once at a given time. so I wrote a poor-man mutual exclusion based on file locking. Not the best code in the world but it does ...
Score of -4
1 answer
197 views

Added 2026-10-12 None of the answers or comments helped with a solution to my issue. Two comments were correct (Santiago Squarzon on October 1st) and (mclayton on October 11th). The reason that my ...
Score of 1
1 answer
96 views

I have a loop that creates runspaces, adds them to $RunspacePool, executes .BeginInvoke() and eventually adds them to an array in a synchronized hashtable. The script block for each of the runspaces ...
Score of 0
1 answer
172 views

I have a very simple script that is supposed to download multiple repos simultaneously. But I am having trouble even getting one working. $blah = Start-Job { git clone https://github.com/...
Score of 4
1 answer
135 views

In this example, is there a way to programmatically infer the source object's ("MyTestString") type ? Assume that the source object is a literal and not stored in a variable. PS C:\> $...

15 30 50 per page
1
2 3 4 5
…
7938