Jul 25, 2016

Invoke-Command removing temp files

For some reason c:\windows\temp seems to be filling up with Windows Updates on a lot of our servers. Here is a quick Invoke-Command solution.
Invoke-Command -ComputerName $computername -ScriptBlock {Remove-Item c:\windows\temp\* -Force -Recurse}
Invoke-Command -ComputerName $computername -ScriptBlock {Get-PSDrive c}

Mar 17, 2016

Spotlight Issues

I'm not sure what upgrade did it but at one point, Spotlight became totally unusable for me. I think it was a major update that enabled web-searches as part of Spotlight.

Now I've been using Spotlight for years to launch applications. There's nothing easier when you're typing along and need to launch an application than hitting 'command - space' and continuing to work, or to do a quick bit of math, or a to take a quick note... the possibilities are endless (okay, not endless but it's a lot!). At some point, that quick little shortcut became a long, long pause.

Now recently I decided to tackle this issue as it became just too frustrating. I messed with the Spotlight preferences, I re-indexed, I searched, but eventually gave up until I launched activity monitor to see what was going on behind the scenes. I saw that 'suggestd' was pegging the CPU during that time. A quick search brought up this link which seems to have solved the problem.

https://discussions.apple.com/thread/7264893?start=0&tstart=0

Basically you need to delete the ~/Library/Suggestions folder and relogin. I'm sure there is some kind of cache in there that was corrupted somewhere along the way. Anyway, this was a great find for me and I'm happily back to using Spotlight on a regular basis.