Using this small script we can easily enable the active directory recycle bin feature in windows 2008r2.we have to copy the code to text editior and save it as a powershell script format(ps1).
Import-Module ActiveDirectory
$strforestname=(Get-AdForest).name
Enable-AdoptionalFeature ‘Recycle Bin Feature’ -Scope ForestOrconfigurationSet -Target $strforestname
*note-Remember to set the execution policy before running any of the powershell script(refer the below link)
http://technet.microsoft.com/en-us/library/ee176961.aspx
Usefull powershell commands
Good tools for scvmm 2012
Powershell 3 show-command
With the powershell 3 we are getting very usefull command which is named as show-command.This almost similler to the get-command but using this we can sort the command by module vice.This will give u a some kind of gui interface.(see the example)
http://technet.microsoft.com/en-us/library/hh849915.aspx