XenDesktop – No items match the supplied pattern

So this was driving me nuts for a while.

I was trying a simple task: Setting the power scheme for a XD pool. Should be straight forward, but it kepts failing, giving me “No items match the supplied pattern”.

Now luckily it’s powershell based (yay!), so it’s solvable. And seing as this isn’t something I change that often, I’m not going to be digging for the answer as to WHY this happens. For some reason it can’t find the power scheme, even though it’s there. No typos, nothing. If you run “Get-BrokerPowerTimeScheme”, you might find like I did, that they match. It’s just not working.

However, “Get-BrokerPowerTimeScheme” does work. And “Set-BrokerPowerTimeScheme” works. So what do we do then? We pipe.

Use Get-BrokerPowerTimeScheme to find the UID of the scheme, and pipe it in. In my case it goes like this:

Get-BrokerPowerTimeScheme -Uid 5 | Set-BrokerPowerTimeScheme -PoolSize @(7,7,7,7,7,7,17,17,17,17,17,17,17,17,17,17,17,17,7,7,7,7,7,7) -PoolUsingPercentage $False -AdminAddress ‘server.domain.local:80’

This was weekday scheme for me, just do the same thing for weekend.

If you’re kind lost here, you’ll see that in the error message from XD Desktop Studio, the command it tried to run is listed. So just do the changes you want, copy the error message out, and find the set-brokerpowertimescheme command. Chop off name and displayname, and do as above.

Neat! Well not really. But working is always better than not working.

Leave a Reply

Your email address will not be published. Required fields are marked *