How can I improve PowerShell performance without guessing?
A performance change should improve the measured workload without sacrificing correctness or wasting capacity. Which measurements and bottlenecks should be considered first?
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
A performance change should improve the measured workload without sacrificing correctness or wasting capacity. Which measurements and bottlenecks should be considered first?
PowerShell ships Get-TimeZone and Set-TimeZone , but neither converts a datetime between two arbitrary zones — they read or change the local system zone. Actual conversion falls to the .NET System.TimeZoneInfo methods such as ConvertTimeBySystemTimeZoneId . That leaves an identifier gap for scripts that must run under both Windows PowerShell 5.1 and PowerShe
Implementing a system that manages a high volume of concurrent background tasks requires a strategy for enforcing strict timeouts and ensuring immediate cancellation of hanging operations. In PowerShell 7.x, the primary architectural choice is between the high-level Job abstraction and the lower-level Runspace model. Start-Job provides a simplified interface
Evaluating startup and execution cost for infrequent, single-script PowerShell invocations on Windows and cross-platform systems is a design concern for low-traffic workloads. The goal is to minimize CPU, I/O and memory overhead per run. PowerShell 7 is documented to use module lazy loading, which differs from Windows PowerShell 5.1 behavior where referenced
Powershell stopped using its persistent history (Windows 11). When I start a new Powershell instance commands from previous sessions don't show up. Once I use commands in the new session for the first time they can be recalled via F8/arrows etc. What I checked/found out so far: Checking the history file C:\Users\[username]\AppData\Roaming\Microsoft\Windows\P
In Linux we have the "wc" command which allows us to count the number of characters, words and lines in a file. But do we have a similar cmdlet in PowerShell. The Measure-Object cmdlet I tried could only count the number of lines but not the characters and words.
Organizations evaluating the shift from WinRM to SSH as the transport for PowerShell remoting need to know whether existing Just Enough Administration (JEA) endpoints continue to enforce their role definitions and session restrictions without modification. While SSH provides a cross‑platform, firewall‑friendly channel, it does not expose the full WS‑Manageme
Context After restoring a 12 TB Windows Server Backup (wbadmin) snapshot to a new volume, the team needs an automated post-restore integrity check that fits within a four-hour maintenance window. Two documented approaches exist: Get-FileHash -Algorithm SHA256 (managed .NET streaming, single-threaded on PowerShell 5.1, parallelizable via ForEach-Object -Paral
Symptom PSCredential objects encrypted with ConvertTo-SecureString rely on Windows DPAPI bound to the creating user account and machine. Exporting the credential with Export-Clixml produces XML that cannot be decrypted by a different user or on another host, blocking credential reuse in CI/CD pipelines and shared test environments. Cross-runtime divergence P