#OSC – Journey into PowerShell – SlideDeck and code

Hi all,

It’s been a while, but I’ve kept myself busy in the meantime.
During my last post on my blog, I was waiting for an assignment at my new job at OSC, only to be presented with a new challenge which kept me from posting for a while [expect more posts soon!!].

In the meantime I had also agreed to provide small training/demo session on PowerShell along with my new colleague Danny den Braver, to show people how awesome it actually is, while even showing them some PowerShell on Linux things [a few Linux guys there 🙂 ].

As promised at the end of the demo, here’s all the code as used by us that day:

OSC – A journey into PowerShell

 

Happy scripting 🙂

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Script Dumpster: Clean-RedirectedRecycleBin

The problem

Redirected 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.

The Script

 

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Script Dumpster: Find default AD containers for Users and Computers

The Problem

Have you ever created a new user or computer object, but you’re unable to find them in the Default Computers/Users container?
Perhaps someone moved the default location to another Organizational Unit [i.e. to make sure GPO’s applied correctly] .

In this case a quick and simple script will check which containers are configured for this task and it will check if they’re using default values or not.

The Script

 

 

Facebooktwittergoogle_plusredditpinterestlinkedinmail