What should I check first when PowerShell fails?
A failure needs to be narrowed down before settings are changed or operations retried. Which evidence best separates application errors from environment and dependency problems?
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
A failure needs to be narrowed down before settings are changed or operations retried. Which evidence best separates application errors from environment and dependency problems?
Configuration must be available to the application without exposing credentials in source control, logs or browser code. What belongs in the runtime and which access controls matter?
Timeout expired obtaining a connection from the pool in PowerShell System.Data.SqlClient scripts In Windows PowerShell 5.1 and PowerShell 7+ sessions using System.Data.SqlClient, scripts that create SqlConnection objects without explicit disposal can intermittently throw a SqlException with the message: "Timeout expired. The timeout period elapsed prior to o
Handling Retries in PowerShell When a transient failure occurs during a configuration change, re‑applying the same operation can unintentionally duplicate writes if the command is not idempotent. PowerShell’s Desired State Configuration (DSC) framework relies on the Test‑Get‑Set pattern: Test-TargetResource verifies the desired state, Get-TargetResource repo
Compare suitability, operational responsibilities and limits before choosing this technology for a project. Which trade-offs should guide the decision?
I had a script that needed to run as an administrator but then run a single command in a non-elevated context. I was previously doing it with runas /trustlevel:0x20000 program.exe , but after updating Windows 11 to 22H2 the command now gives the following output (running Notepad here as an example): PS > runas /trustlevel:0x20000 notepad RUNAS ERROR: Unab
Deployment Context The goal is to create a set of transport rules in Exchange Online via PowerShell with explicit priority values so that rule evaluation follows a deterministic order. Constraints include the undocumented behavior that identical priorities are resolved by creation timestamp, and that Import‑TransportRule defaults priorities to 0. Observed Un
Goal Enable scripts to access runtime‑generated properties on .NET objects while operating in Constrained Language Mode (CLM). Constraints CLM blocks any property or method not explicitly on the allowed list. Dynamic properties created by COM objects or API wrappers are not present at compile time. AppLocker LanguageSessionMode may override or extend the all
Goal: Use PowerShell’s built‑in transaction cmdlets to automatically roll back database schema changes when an error occurs during a script. Constraint: The SqlServer provider does not implement ITransactionSupport , so Start-Transaction does not enlist Invoke-Sqlcmd statements; any SQL executed outside an explicit SqlTransaction is committed immediately and