Get all (non-default) scheduled tasks

I tried querying the scheduled tasks to give me a list of all (non-default) scheduled tasks. I also wanted to have its schedule information, which appeared to be a pretty hard task in the get-service command. After several unsuccessful attempts, I tried something else with great and immediate results. It appeared that the schtasks did … Continue reading Get all (non-default) scheduled tasks

Get all non-default Windows services

Getting a list of all services isn't that hard. This can be achieved with Get-Service or with Get-WmiObject win32_service. It seems that Get-Service doesn't leave me with enough properties to query and/or filter out, and this time the Get-WmiObject queries work quick enough; thus I'll use this for my code. I wanted a list of all … Continue reading Get all non-default Windows services

Offline servicing of a VHD or WIM file

I came across a nifty PowerShell module today. The Module can be found here: http://windowsitpro.com/windows/add-updates-offline-vhd-or-wim-file It's an automation of the offline servicing of a VHD(X) or WIM file. If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { $Arguments = "& '" + $myinvocation.mycommand.definition + "'" Start-Process powershell -Verb runAs -ArgumentList $Arguments Break } Import-Module C:\Install-Patch.psm1 Install-Patch <Path/share to vhdx … Continue reading Offline servicing of a VHD or WIM file

Weird get-process behaviour

Today I encountered some weird behaviour by the get-process command. I was working on a tool to get a list of open programs on a remote computer when I encountered some strange behaviour/inconsistencies, even within the host itself (without remotely connecting and querying). Once I use the get-process -name command to get the session ID for … Continue reading Weird get-process behaviour

Add-WindowsFeature Error: 0x800f0902 – The operation cannot be completed because Windows is currently performing another servicing operation

Today I encountered a problem, for which I couldn't find a solution (which is pretty rare), so thought I'd post a blog about it and maybe someone can help me. I sometimes have a problem with the Add-WindowsFeature. In powershell, overall it works fine, but sometimes it gives me the following error: Add-WindowsFeature: The request … Continue reading Add-WindowsFeature Error: 0x800f0902 – The operation cannot be completed because Windows is currently performing another servicing operation