The recycle bin doesn't show up when you type it into the start menu which seems incredibly moronic. I am able to create a shortcut and pin it to the start menu so it shows up, but I'd like to automate it for the next time I install Windows 10.
Is there a way to automate this using PowerShell, Batch, or VBS?
I tried with PowerShell, but it says access is denied. Even when run as admin.
$shell = New-Object -ComObject "Shell.Application"
$StartMenuProgramsFolder = [Environment]::GetFolderPath("StartMenu")
$folder = Join-Path -Path $StartMenuProgramsFolder -ChildPath "Programs"
$folder = $shell.Namespace($folder)
$item = $folder.Parsename("test.lnk")
$verb = $item.Verbs() | Where-Object {$_.Name -eq '&Pin to Start'}
if ($verb) {
$verb.DoIt()
}
Creating a shortcut in the shortcut folder and restarting explorer.exe
doesn't automatically pin it to the start menu anymore either.