We are in the process of changing over our Print Server and the first step on the plan was to get some data from all the computers on my network about which printers they had installed. This needed to grab the data from all users on all PCs so the only logical way to do this was to create logon script below and let it run for a week. In a previous post I discussed how PowerShell Export-CSV turns lovely tables in to garbage but now I needed to get a CSV from hundreds of separate text files …
Tag Archives: PowerShell
PowerShell Export-CSV turns lovely tables in to garbage
Following on from my promise to do better blogging in 2013, here’s something that frustrated me in PowerShell.
It stems from me being very much a beginner still in the PoSh ranks. Although, I’m using it more and more of late and starting to get the hang of it all
One issue I recently struggled with was when a user asked me if I could create a spreadsheet containing all the London staff phone numbers and email addresses. This sounded easy enough, I ran the following line of code and was happy with my results
How to Troubleshoot Windows Update Errors
Windows Update (a.k.a. Microsoft Update) is normally pretty reliable in terms of keeping your computer up to date and secure. Unfortunately, there are times when an update crashes your PC (usually due to a conflicting OEM driver) or the update process just stops working. Since Windows Vista, Microsoft moved away from using the update.microsoft.com website and now has a dedicated app in the Control Panel. However, the underlying technologies are still the same. Even if you have the Windows Software Update Services (WSUS) server, controlling 100s or 1000s of computers in a corporate network, you are still going to come across the same kind of problems. You would hope that WSUS had some easy troubleshooting/rollback tools built in but unfortunately that is not the case.
I thought it would be a good idea to gather all the various methods and tools I use when troubleshooting Windows/Microsoft Update to help both Home and Enterprise users alike
Using PowerShell to send a Windows Service Recovery Email Alert
Each Service that runs in Windows features a Recovery tab in the Services.msc management console. Normally I only ever set this up to restart the service after 5 minutes in case something had conflicted with it’s initial start-up attempt. However, we recently had a problem with an IBM service that caused our Windows 2003 R2 x64 Server to reboot if it crashed. I thought it would be very handy if we could get an email sent to the IT department if the service was failing. I had dabbled with using BLAT in the past but seeing as all of our servers already have PowerShell installed I thought that would be a more efficient option.