PowerShell: Empty Recycle Bin

Here is a quick PowerShell script I found recently to clear the Windows Recycle Bin. This can be really useful if you want to automatically empty the Recycle Bin through something like the Task Scheduler. This code comes from the TechNet Script Center, courtesy of Windows Engineer and PowerShell Blogger Rich Prescott.

$Shell = New-Object -ComObject Shell.Application
$RecBin = $Shell.Namespace(0xA) 
$RecBin.Items() | %{Remove-Item $_.Path -Recurse -Confirm:$false}

This script allows you to view the contents of the recycle bin in your profile. The first line creates a ComObject and then the second line grabs the Recycling Bin special folder. It then enumerates the items contained in that special folder and removes each of them. The Remove-Item cmdlet includes a switch to turn off confirmation for the removal of the files. It can be removed if you would like to be prompted for each file.

Works on:

Windows Server 2012 and Up Yes Windows 10 and Up Yes
Windows Server 2008 R2 Yes Windows 8 Yes
Windows Server 2008 Yes Windows 7 Yes
Windows Server 2003 No Windows Vista Yes
Windows XP Yes
Windows 2000 No

Source

RoboForm: A full featured password manager and more

Lets face it: We have more passwords than we can ever remember. Whether it’s personal or work, we usually have dozens if not hundreds of username/password sets to remember for various applications and sites. The solution for most people is to reuse their username and passwords across sites. While this may make them easier to remember it also makes it easier for  them to be compromised. The common recommendation is to use passwords composed of alphanumeric characters (0-9, a-z, A-Z) and symbols. While that may increase the security of your passwords the likelihood of remembering one instance of “a320#.?atx!” is small, let alone 30 for a dozen different systems. It’s much easier to remember the name of a pet or a relative/spouse. So how do you get around the need for more secure passwords while  actually being able to remember the passwords themselves or instituting expensive biometric systems?  One answer is to use a password manager. There are several popular ones available but I favor RoboForm after having used it for several years. Why use a password manager and why choose RoboForm over other solutions? Well, lets dig in below and see!
Read more of this post

Verified by MonsterInsights