Permission setup commands

Here are a few useful commands to setup Windows file permissions.

Take Ownership of a folder(including files and subfolders)
Takeown /f foldername /r /d y

Reset Permission of folder(including all files and subfolders) to Inherit
Icacls folder /reset /T

disable inheritance for a
icacls Folder/inheritance:d

Set read permission for AD group on folder and subfolder
Icalcs Folder /grant domain\Groupname:(OI)(CI)RX /T

Set modify permission for AD group on folder and subfolder
Icalcs Folder /grant domain\Groupname:(OI)(CI)M /T

Set listing permission to this folder only
Icacls Folder /grant domain\group:(X,RD)

Remove Permission from Folder and subfolder
Icacls folder /remove domain\group

Powershell Scripts for IT Support

I just started a new project at work.
Finding and creating useful Powershell scripts for IT Support.
My Problem is to find good sources who explain this for me.
So I bought me two books for self study.

I will start with some easy scripts and continue with more powerful ones.

Actually I have a problem to create scripts for Windows 7 and PS 2.0 .
It’s so much easier to create PS 3.0 scripts but most of the clients are actually Windows 7.

So if I finished some of these scripts, you will find them in the tutorials section.

If you have good sources for PowerShell Scripts or selfstudy websites, please leave me a comment.