This idea is to add Windows defender related cases to context menu so that people can easily scan files or folders in Windows 8.
Sometimes users want to scan files or folder by using Windows Defender manually. But there are several steps to follow. This script is to solve that.
Step 1: Double click the script.

Step 2: Then it will show UAC message, press YES.

Step 3: After that, it will display a message box as the following.

Note
1. Do not move file scan.ps1 in the script folder.
2. If you want remove the item from context menu, just re-run the script.
Here are some code snippets for your references.
Sub DeleteSubkeys(HKEY_CLASSES_ROOT, strKeyPath)
Dim strSubkey,arrSubkeys,strComputer,objRegistry
strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & _
strComputer & "\root\default:StdRegProv")
objRegistry.EnumKey HKEY_CLASSES_ROOT, strKeyPath, arrSubkeys
If IsArray(arrSubkeys) Then
For Each strSubkey In arrSubkeys
DeleteSubkeys HKEY_CLASSES_ROOT, strKeyPath & "\" & strSubkey
Next
End If
objRegistry.DeleteKey HKEY_CLASSES_ROOT, strKeyPath
End Sub
Sub DeleteSubkeys(HKEY_CLASSES_ROOT, strKeyPath) Dim strSubkey,arrSubkeys,strComputer,objRegistry strComputer = "." Set objRegistry = GetObject("winmgmts:\\" & _ strComputer & "\root\default:StdRegProv") objRegistry.EnumKey HKEY_CLASSES_ROOT, strKeyPath, arrSubkeys If IsArray(arrSubkeys) Then For Each strSubkey In arrSubkeys DeleteSubkeys HKEY_CLASSES_ROOT, strKeyPath & "\" & strSubkey Next End If objRegistry.DeleteKey HKEY_CLASSES_ROOT, strKeyPath End Sub
Windows 8 or later version