Very often in administrative scripting you will want to create a log file where the filename is a timestamp like 200605201912.log. Since PowerShell is based on .NET Framework objects, we can take advantage of the DateTime object which is obtained by using the Get-Date cmdlet: PS C:\> get-dateSunday, May 21, 2006 6:47:03 PMIf we create…
Category: PowerShell
PowerShell TFM
Most of you may already know, but I am working on a new book with Don Jones on PowerShell for SAPIEN Press. It should be out before the end of the year, hopefully sometime this fall. We also got a nice plug from PowerShell architect Jeffrey Snover. I’ll be adding more PowerShell information in the…
Monad and Event logs
Here’s another nifty Monad example from The Lazy Admin on using MSH to review Event logs. Managing the Event Logs with MSH – The Lazyadmin.com
My first Monad Script
I’ve started testing the waters with the latest build of MSH/Monad. There is of course a nascent Monad script hub at the Technet Script Center. I took inspiration from there and came up with a quick shell script to display services in on the local system. Services that are running are displayed in Green and…
Primal Script 4.0 Enterprise Release
SAPIEN Technologies has finally released PrimalScript4 Enterprise. The product offers a wealth of scripting power including a great script packager (convert your scripts to an exe complete with alternate credentials), a database browser (including a Visual Query Builder), ADSI and WM wizards, and a remote script execution feature. With this you can execute scripts remotely…