Windows Media Player 11 Won’t Minimize to Taskbar

Posted on November 28th, 2007 in Vista by Tom

This has nothing to do with PowerShell :p

That said, I was sitting here working on ye olde blog when I thought “I want to listen to some Foo Fighters”…then I minimized WMP and it just…minimized. I wanted mini mode, where I get all of the controls on the taskbar…it works on my laptop, why not my desktop?

I don’t know why this took me so long to find. Wait, yes I do. I was looking all over WMP 11 for the setting. Turns out it isn’t there. To get WMP 11 to minimize to the taskbar (aka, mini-mode), right click your taskbar, go to toolbars, and make sure Windows Media Player is checked. Maybe I turned that off on my own a while ago and forgot it was there. I can’t remember the default behavior.

What makes this all more amusing is that I have a Logitech G15 keyboard, which has all of the controls right on top…

Powershell 2.0 CTP - Remoting - PowerShell Remove WDS

Posted on November 20th, 2007 in Active Directory, PowerShell 2.0 CTP, Server Management by Tom

So, with PowerShell 2.0 CTP’s arrival, and me finally having some time to mess around with some of the new features, here’s my previous (and first popular) post re-hashed for PowerShell 2.0 CTP. This will only work on machines with WS-Management installed, so it probably won’t work on most of your machines (unless you’ve deployed it), but it works well in my little test world. It utilizes two new features. These features are the [ADSISearcher] and Invoke-Expression. Instead of creating all of the Directory Service objects each time, you can just cast the ASDISearcher type and you’re done. Invoke-Expression allows you to use the -computer parameter and pass one, or many, computers to the cmdlet. I chose to use a single command here.

[adsisearcher]$searcher = "LDAP://dc=foo,dc=bar,dc=com"
$searcher.filter = "(objectclass=computer)"
foreach ($machine in ($searcher.findall()))
{
   invoke-expression -computer $machine.properties.cn -command "c:\windows\`$NtUninstallKB917013`$\spuninst\spuninst.exe /q /norestart"
}

I haven’t had a chance to test it, but you could use mutiple computers. We could change the foreach loop to write to a text file, then read that file for the computer names.

...
foreach ($machine in ($searcher.findall())){ add-content c:\temp\machines.txt "$($machine.properties.cn)" }
invoke-expression -computer (get-content c:\temp\machines.txt) -command "c:\windows\`$NtUninstallKB917013`$\spuninst\spuninst.exe /q /norestart"

That’ll kick off on 50 machines at a time. You can adjust that via the -ThrottleLimit parameter, and make it more or less, depending on bandwidth, CPU power, etc.

As you can see, I tend to learn better by example or by practical application. You’ll never see me write a book :) More soon!!