119,259 questions
0
votes
0
answers
28
views
silent npm error when publishing azure artifacts
We're running a pipeline with a self-hosted azure agent.
There is a post build event where the build results are posted to a private azure artefact feed, in a powershell script.
When launched manually ...
3
votes
2
answers
95
views
Powershell 7.4.5 attempting Add-Type of Oracle.ManagedDataAccess.Core gets error loading System.DirectoryServices.Protocols
I am attempting to write a script to connect and load an Oracle database in Powershell 7.4.5. The issue is when attempting to
Add-Type -Path <Path to ManagedDataAccess.(Core)dll
Powershell throws ...
1
vote
1
answer
87
views
How to retrieve all Microsoft Defender for Cloud recommendations for a specific Azure resource using PowerShell?
I am using Microsoft Defender for Cloud in Azure and I want to centrally retrieve all security recommendations for a specific Azure resource (for example, a VM, Storage Account, or App Service) ...
0
votes
0
answers
93
views
Powershell's Az-GetStorageBlob cmdlet returning inconsistent results on different environments when blob does not exist
I have 2 different Windows VMs, both with the same version of the Az module (15.1). I am executing the exact same script on both.
At a point in the script where the Get-AzStorageBlob cmdlet is called, ...
1
vote
0
answers
89
views
How to run a powershell script as a domain Administrator in Vagrant
I have a Windows Domain with 2019 provisioned with Packer and Vagrant. It works fine, I have managed to create a SQL Server and join the domain.
When I try to provision an Exchange Server I need to ...
0
votes
0
answers
89
views
Script to upgrade vm tools [closed]
I want to upgrade VMware Tools on my virtual machines. However, some VMs cannot be rebooted during working hours, so the upgrade needs to be done at night.
I wrote a PowerCLI script to handle this, ...
1
vote
1
answer
183
views
The latest Windows 10 Update (KB5071546) caused Invoke-WebRequest calls to hang within Scheduled Jobs
After running the latest Windows 10 update (KB5071546) from December 9, 2025 (OS Builds 19045.6691 and 19044.6691) a number of scheduled jobs I run stopped functioning properly. They would start as ...
2
votes
2
answers
141
views
Print go back one line and clear not working in PowerShell + Python
In Python I am trying to print something, erase/clear that line, then print over it again. The below code works on one of my computers but the second the ANSI escape codes (the \033[F bits) get ...
3
votes
1
answer
97
views
Powershell Class generic interface arguments type resolution problem
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 ...
4
votes
2
answers
160
views
Can PowerShell automatically create missing directories when redirecting output?
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 ...
3
votes
1
answer
123
views
Access VBA for MDW User-Level Security
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($...
Tooling
1
vote
2
replies
59
views
How to block PowerShell execution on Windows 11 multi-session Azure VDI (single local user, others using RemoteApp)
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 ...
0
votes
0
answers
82
views
How to get rid of the 'WindowsPowerShell' folder in my 'Documents' folder? [closed]
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 / ...
-4
votes
1
answer
118
views
How can I list all branches from every repository in a GitHub account using GitHub CLI? [closed]
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 ...
Advice
1
vote
12
replies
150
views
How can I combine two or more arrays into a unique set without changing the data type in Powershell?
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 ...