/images/ducttape.png

Scheduled Tasks - PowerShell Scripts with Parameters

Perhaps a very “simple” issue, but I noticed that when looking for this it took me longer than expected to find the result I had in mind. The issue at handI have a script which requires various parameters to be provided so that I can run it. When running the command through an active console session it would look like this: 1 .\Get-MailboxAuditLoggingReport.ps1 -Mailbox ProblemMailbox -Hours 24 -SendEmail -MailFrom administrator@contoso.com -MailTo administrator@contoso.

Migrating scheduled tasks from 2008 to 2012+

Today I was busy with a customer who needed to migrate some Scheduled Tasks from his Windows Server 2008 to his new Windows Server 2012 R2 machine. Slight issue, there were 139!! Scheduled Tasks [generating reports and sending them to various sources]. There’s no way I was going to do this manually, so let’s start up my favourite tool for the job: PowerShell! I immediately ran into the first issue: There are no PowerShell cmdlets for Windows 2008 concerning Scheduled Tasks, so you’re limited to the built in command SchTasks, however this can be a troublesome parsing etc.

Script Dumpster: Clean-RedirectedRecycleBin

The problemRedirected Folders on RDS Session hosts tend to cause a specific issue: Each user’s set of Redirected Folders creates their own Recycle Bin entry, which can grow quite a bit. The following function can display a list of files contained within the Recycle Bins older than the provided age. Even better, the script has a switch parameter Remove which does exactly what you think it does 🙂 Through a scheduled task you can run this script on a regular basis when required.

Script Dumpster: Find services running under non-standard accounts

The ProblemLooking for services which are running under NON-standard accounts? Just use this script to display these services. Very handy in case you need to change passwords for service accounts or want to see what services might be improperly configured [e.g. running under Administrator credentials, or worse, Domain Administrator credentials] The Script 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 <# .

Its been a while...

Hey guys and girls, Unfortunately I haven’t really had much time to blog due to some busy times [work, work, work, family, friends, work], but I’ll try and update more regularly with the content I use at my daily tasks. This might mean that I will also end up posting some non-PowerShell related posts in case I think they’re interesting enough for other people. Judging by personal experience the last few weeks, I will also try and post some “checklists” which I found out for recent cases at work, simply by combining multiple articles and/or Best Practice guides.

Experts Live 2015 - tickets tickets tickets!

Step right up, step right up….A quick post on behalf of my colleague, 365Dude, who’s presenting a session at this year’s Experts Live 2015. He still has 3 tickets available in case someone is interested in going to this year’s convention, November 19th. Be sure to drop him an e-mail if you’re interested in going! And even if you’re not interested in an Office 365 session, have a look at the program to see what might else be of your interest!