How to kill a service stuck in pending state.
· ☕ 2 min read · ✍️ Javy de Koning
WinRM ‘StopPending’ issues Recently I logged into a machine and ran ‘Enable-PSRemoting -Force’ to end up with error code ‘2150858770’. WinRM service was in ‘StopPending’ state: 1Enable-PSRemoting -force 2WinRM has been updated to receive requests. 3WinRM service started. 4 5Set-WSManQuickConfig : <f:WSManFault xmlns:f="" Code="2150858770" M 6achine="blabla.local"><f:Message>The client cannot connect to the destination specified in the request. Verify 7 that the service on the destination is running and is accepting requests. Consult the logs and documentation for the W 8S-Management service running on the destination, most commonly IIS or WinRM.

Eventlog tailing and parsing the using Powershell!
· ☕ 3 min read · ✍️ Javy de Koning
Issue Last week I ran into a few DFS issues. When troubleshooting I like to actively watch the log file, or in this case, the Windows Eventlog. On Linux I would use tail -f but what about Windows Eventlog? Also, I only needed a certain part of the information, so there is a need to parse the Eventlog as well. Powershell to the rescue! Powershell solution So we need to:

Use PowerShell to spell names, passwords etc!
· ☕ 4 min read · ✍️ Javy de Koning
We frequently need to spell out names, ticket ID’s or other complex “words” over the phone. We also frequently deal with some special characters in passwords and so-on. If you don’t often practice this, quickly spelling-out over the phone might be difficult. To counter this issue I’ve decided to create a simple PowerShell function for people to put into their profile for easy access. It works like this: 1Get-NatoSpelling 'MyP@$sw0rd_!$_c00l' Result:

Write-Progress… The proper way!
· ☕ 2 min read · ✍️ Javy de Koning
Write-Progress Issues So, you wrote a script and included nifty progress bar, fairly simple. But your script runs slow, especially in a Powershell terminal. Let me explain how you can address this issue. First, the relevant part of the script: 1for ($i=0; $i -le 10000; $i++) { 2 Write-Progress -Activity Testing -Status something -PercentComplete (($i/10000)*100) 3} As an example let’s tun it in the ISE, wrapped in Measure-Command to time the performance and…