Search
Topics
Archives
- February 2012 (2)
- January 2012 (3)
- November 2011 (1)
- October 2011 (3)
- September 2011 (1)
- August 2011 (6)
- July 2011 (1)
- June 2011 (1)
- April 2011 (1)
- March 2011 (4)
- February 2011 (1)
- January 2011 (1)
- November 2010 (1)
- October 2010 (3)
- July 2010 (3)
- June 2010 (1)
- April 2010 (1)
- November 2009 (1)
- July 2009 (1)
- April 2009 (2)
- October 2008 (3)
- August 2008 (2)
- May 2008 (1)
- February 2008 (1)
- October 2007 (2)
- August 2007 (2)
- July 2007 (2)
- May 2007 (1)
- April 2007 (3)
- March 2007 (2)
- December 2006 (3)
- November 2006 (4)
- October 2006 (3)
- July 2006 (3)
Category Archives: Scripting
PowerShell: Cancel all print jobs
Here’s a quick PowerShell script I put together to delete all print jobs from our Windows Server 2008 R2 print server. It’s run overnight as a scheduled task. We do this because sometimes our print accounting software doesn’t clear out … Continue reading
Use the current date in a batch file
I’d done this before, but couldn’t remember how to do it. I found this useful article on support.microsoft.com If you want to grab just the date digits section of today’s date, do the following (echoed in this example) echo %date:~-10,10% … Continue reading
Posted in Scripting, SysAdmin, Windows
Leave a comment
Self-sign your Powershell scripts
Creating my first Powershell script, I came up against code execution issues. Rather than take the easy (sketchy) way out and simply enable execution of unsigned code, I went and figured out how to sign my scripts using my internal … Continue reading
Posted in Scripting, SysAdmin
Leave a comment
VBScript – Check if current user is a member of a certain group
I found some code to do this out on the net the other day. I’ve modified it a little, and added the part that checks environment variables. Note: 11th October 2010 – Since this post is so popular, I’ve cleaned … Continue reading
Posted in Scripting, SysAdmin, Windows
8 Comments
Windows XP Print-Mapping Automation
Found a useful feature in Windows XP the other week when stuffing around with print-mapping scripts. Instead of using the old con2prt feature to connect to printers, you can use Windows’ inbuilt printing APIs to map printers, add new drivers … Continue reading
Posted in Scripting, Windows
3 Comments