Windows 10 Shell Commands

Windows 10 Shell commands:

  1. “shell:AccountPictures”
    Note: this command accesses the account pictures folder you have in your Windows 10 device.
  2. “shell:AddNewProgramsFolder”
    Note: Adds a new program folder.
  3. “shell:Administrative Tools”
    Note: Accesses administrative tools folder.
  4. “shell:AppData”
    Note: Accesses AppData folder in the Windows 10 system.
  5. “shell:Application Shortcuts”
    Note: Accesses Application Shortcuts folder.
  6. “shell:AppsFolder”
    Note: Accesses the Apps Folder.
  7. “shell:AppUpdatesFolder”
    Note: Accesses the Apps updates folder.
  8. “shell:Cache”
    Note: Accesses the Cache folder.
  9. “shell:Camera Roll”
    Note: Access camera roll folder.
  10. “shell:CD Burning”
    Note: Accesses the temporary burn folder.
  11. “shell:ChangeRemoveProgramsFolder”
    Note: Accesses the Remove/Change program folder.
  12. “shell:Common Administrative Tools”
    Note: Accesses the Administrative Tools folder.
  13. “shell:Common AppData”
    Note: Accesses the Common AppData folder.
  14. “shell:Common Desktop”
    Note: Accesses the public desktop folder.
  15. “shell:Common Documents”
    Note: Accesses Public Documents folder.
  16. “shell:Common Programs”
    Note: Accesses Programs folder.
  17. “shell:Common Start Menu”
    Note: Accesses the start menu folder.
  18. “shell:Common Startup”
    Note: Accesses Startup folder situated in t he Windows 10 system.
  19. “shell:Common Templates”
    Note: Accesses “Common Templates” folder.
  20. “shell:CommonDownloads”
    Note: Accesses Downloads folder.
  21. “shell:CommonMusic”
    Note: Accesses the music folder.
  22. “shell:CommonPictures”
    Note: Accesses “Pictures” folder.
  23. “shell:CommonRingtones”
    Note: Accesses the ringtones folder.
  24. “shell:CommonVideo”
    Note: Accesses the public “Video” folder.
  25. “shell:ConflictFolder”
    Note: Accesses the “Conflict” folder in the Windows 10 system.
  26. “shell:ConnectionsFolder”
    Note: Opens up the connections folder
  27. “shell:Contacts”
    Note: Opens the Contact folder
  28. “shell:ControlPanelFolder”
    Note: Opens the Control panel folder.
  29. “shell:Cookies”
    Note: Opens the Cookies folder.
  30. “shell:CredentialManager”
    Note: Opens the Credential manager feature.
  31. “shell:CryptoKeys”
    Note: Opens up the Crypto keys folder
  32. “shell:CSCFolder”
    Note: Opens the CSC Folder.
  33. “shell:Desktop”
    Note: Opens up the Desktop folder.
  34. “shell:Device Metadata Store”
    Note: Opens the metadata store folder.
  35. “shell:DocumentsLibrary”
    Note: Opens the Documents Library folder
  36. “shell:Downloads”
    Note: Opens the Downloads folder
  37. “shell:DpapiKeys”
    Note: Opens the DpapiKeys folder
  38. “shell:Favorites”
    Note: Opens the Favorites folder.
  39. “shell:Fonts”
    Note: Opens the Fonts folder.
  40. “shell:Games”
    Note: Opens the Games folder.
  41. “shell:GameTasks”
    Note: Opens the Game Tasks folder
  42. “shell:History”
    Note: Opens the History folder
  43. “shell:HomeGroupCurrentUserFolder”
    Note: Opens the HomeGroup folder for the current user.
  44. “shell:HomeGroupFolder”
    Note: Opens HomeGroup folder.
  45. “shell:ImplicitAppShortcuts”
    Note: Opens the Implicit Apps shortcut folder.
  46. “shell:InternetFolder”
    Note: Opens Internet Folder.
  47. “shell:Libraries”
    Note: Opens Libraries folder.
  48. “shell:Links”
    Note: Opens the Links folder.
  49. “shell:Local AppData”
    Note: Opens Local AppData folder.
  50. “shell:LocalAppDataLow”
    Note: Opens Local AppDataLow folder.
  51. “shell:LocalizedResourcesDir”
    Note: Opens LocalizedResources folder.
  52. “shell:MAPIFolder”
    Note: Opens MAPI folder.
  53. “shell:MusicLibrary”
    Note: Opens LusicLibrary folder.
  54. “shell:My Music”
    Note: Opens My Music folder.
  55. “shell:My Video”
    Note: Opens My Video folder.
  56. “shell:MyComputerFolder”
    Note: Opens MyComputer folder.
  57. “shell:NetHood”
    Note: Opens NetHood folder.
  58. “shell:NetworkPlacesFolder”
    Note: Opens NetworkPlaces folder.
  59. “shell:OEM Links”
    Note: Opens OEM Links folder.
  60. “shell:OneDrive”
    Note: Opens OneDrive folder in Windows 10
  61. “shell:Original Images”
    Note: Opens Original Images folder.
  62. “shell:Personal”
    Note: Opens Personal folder.
  63. “shell:PhotoAlbums”
    Note: Opens PhotoAlbums folder.
  64. “shell:PicturesLibrary”
    Note: opens PicturesLibrary folder.
  65. “shell:Playlists”
    Note: Opens Playlists folder.
  66. “shell:PrintersFolder”
    Note: Opens Printer folder.
  67. “shell:PrintHood”
    Note: Opens PrintHood folder.
  68. “shell:Profile”
    Note: Opens Profile folder.
  69. “shell:ProgramFiles”
    Note: Opens ProgramFiles folder.
  70. “shell:ProgramFilesCommon”
    Note: Opens ProgramFilesCommon folder.
  71. “shell:ProgramFilesCommonX64”
    Note: Opens ProgramFilesCommonX64 folder.
  72. “shell:ProgramFilesCommonX86”
    Note: Opens ProgramFilesCommonX86 folder.
  73. “shell:ProgramFilesX64”
    Note: Opens ProgramFilesX64 folder.
  74. “shell:ProgramFilesX86”
    Note: Opens ProgramFilesX86 folder.
  75. “shell:Programs”
    Note: Opens Programs folder.
  76. “shell:Public”
    Note: Opens Public folder.
  77. “shell:PublicAccountPictures”
    Note: Opens PublicAccountPictures folder.
  78. “shell:PublicGameTasks”
    Note: Opens PublicGameTasks folder.
  79. “shell:PublicLibraries”
    Note: Opens PublicLibraries folder.
  80. “shell:Quick Launch”
    Note: Opens Quick Launch folder.
  81. “shell:Recent”
    Note: Opens up recent items folder
  82. “shell:RecordedTVLibrary”
    Note: Opens up recorder file in the Windows 10 system
  83. “shell:RecycleBinFolder”
    Note: Opens the system Recycle Bin folder
  84. “shell:ResourceDir”
    Note: Opens up the Resource folder
  85. “shell:Retail Demo”
    Note: Opens up Demo folder
  86. “shell:Ringtones”
    Note: Opens up the Ringtones folder in Windows 10
  87. “shell:Roamed Tile Images”
    Note: Opens up the Roamed Tile images folder
  88. “shell:Roaming Tiles”
    Note: Opens the Roaming Tiles folder
  89. “shell:SavedGames”
    Note: It opens the SavedGames folder you have in the Windows 10 system
  90. “shell:Screenshots”
    Note: Opens the Screenshots folder
  91. “shell:Searches”
    Note: Opens the Search folder.
  92. “shell:SearchHistoryFolder”
    Note: Opens the Search History folder you have in the system.
  93. “shell:SearchHomeFolder”
    Note: Opens the Search Home folder.
  94. “shell:SearchTemplatesFolder”
    Note: Opens the Search templates folder.
  95. “shell:SendTo”
    Note: Opens the SendTo folder.
  96. “shell:SkyDriveCameraRoll”
    Note: Opens the SkyDriveCameraRoll folder.
  97. “shell:SkyDriveMusic”
    Note: Opens the SkyDriveMusic folder.
  98. “shell:SkyDrivePictures”
    Note: Opens the SkyDrivePictures folder.
  99. “shell:Start Menu”
    Note: Opens up the Start menu folder.
  100. “shell:StartMenuAllPrograms”
    Note: Opens the AllPrograms folder you have in the start menu.
  101. “shell:Startup”
    Note: Opens the Startup folder.
  102. “shell:SyncCenterFolder”
    Note: Opens the SyncCenter folder.
  103. “shell:SyncResultsFolder”
    Note: Opens the SyncResults folder.
  104. “shell:SyncSetupFolder”
    Note: opens the SyncSetup folder.
  105. “shell:System”
    Note: Opens the System folder.
  106. “shell:SystemCertificates”
    Note: Opens the SystemCertificates folder.
  107. “shell:SystemX86”
    Note: Opens SystemX86 folder.
  108. “shell:Templates”
    Note: Opens the Templates folder.
  109. “shell:ThisPCDesktopFolder”
    Note: Opens the ThisPCDesktop folder.
  110. “shell:User Pinned”
    Note: Opens User pinned folder.
  111. “shell:UserProfiles”
    Note: Opens the user profiles folder.
  112. “shell:UserProgramFiles”
    Note: Opens Program Files folder.
  113. “shell:UserProgramFilesCommon”
    Note: Opens Program Files Common folder.
  114. “shell:UsersFilesFolder”
    Note: Opens the Files folder from a specific user you are logged in with.
  115. “shell:UsersLibrariesFolder”
    Note: Opens the Libraries folder for a specific user.
  116. “shell:VideosLibrary”
    Note: Opens Video library folder.
  117. “shell:Windows”
    Note: Opens the “Windows” folder.

Hyper-v .. .all VMs gone after upgrade

I had an issue after a inplace upgrade of a Hyper-v 2012R2 standard to 2016 Standard.
ALl VMs is missing and there is no errors in the eventlogg..
Running the below command fixed the issues and all vms reappeared in the MMC.
Havent had the time to real figureout what it does,
beyond that it has to do with WMI settings that gone corrupt.

"The Managed Object Format (MOF) compiler parses a file containing MOF statements and
adds the classes and class instances defined in the fileto the WMI repository.
MOF files are usually automatically compiled during the installation of the systems with
which they are provided, but you can also compile MOF files
by using this tool. "

https://docs.microsoft.com/en-us/windows/desktop/wmisdk/mofcomp

FIX:
MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mo

Add to PS1 File Context Menu in Windows 10 for editing in ISE elevated

I wanted to get into ISE elevated directly from the shell by just rightclicking the *.ps1 file and then choose to edit …

I realy couldnt find anywone that had made this available public 100% working… so here it is… my verison…

Create a regfile of the below and run it or edit the registry directly…

Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Microsoft.PowerShellScript.1\Shell\Edit(Elevated)]
    @="Redigera (eleverat)"
    "HasLUAShield"=""

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Microsoft.PowerShellScript.1\Shell\Edit(Elevated)\Command]
    @="c:\\windows\\system32\\windowsPowerShell\\v1.0\\powershell.exe -command \"& {start-process -Filepath \"c:\\windows\\system32\\windowsPowerShell\\v1.0\\\\powershell_ise.exe -Verb RunAS %1\"}"

Result

RDS Cert and RDWBmodding

Detta skript gör så man inte får fel i RDGW när man nyttjar det externa namnet från SSL certet.


# Kör detta på på 2016 ConnectionBrokermaskinen eleverat
Import-Module RemoteDesktop
get-rdserver

$clientAccessName = "remote.Kundnamn.se" # SSL namn...
$ConnectionBroker = "vrds04.hr.local"

# Ange nu brokern nedan
set-RDWorkspace -Name "Remote Deskop" -ConnectionBroker $ConnectionBroker

# Gör en backup av RD WEB
$Source = "C:\windows\Web\RDWeb"
$BackupDest = "c:\windows\web\backup\rdweb"
copy-item -Recurse $Source ($BackupDest +"\"+(Get-Date -format "yyyMMdhhmmss"))

# Branding av RDWEB
copy-item *.png ($Source + "\Pages\images")

#Fixa Cert namnen! 2 lägen finns Normal samt HA URL: -> https://gallery.technet.microsoft.com/Change-published-FQDN-for-2a029b80
# I HA läge använder man sig av en sql för all last balansera... och då har man en connectionstring... kolla om vi har det ... null = nope och vi kör troligen inte i HA...
if ((iwmi -Class "Win32_RDMSDeploymentSettings" -Namespace "root\CIMV2\rdms" -Name "GetStringProperty" -ArgumentList @("DatabaseConnectionString") -ComputerName $ConnectionBroker -Authentication PacketPrivacy) -eq $null)
{
# Broker runns probably in HA mode Use Powershell
Set-RDClientAccessName -ConnectionBroker $ConnectionBroker -ClientAccessName $ClientAccessName
}
else
{
# Broker runns probably not i HA mode Use WMI!

#Kollar befintligt namn....
iwmi -Class "Win32_RDMSDeploymentSettings" -Namespace "root\CIMV2\rdms" -Name "GetStringProperty" -ArgumentList @("DeploymentRedirectorServer") -ComputerName $ConnectionBroker -Authentication PacketPrivacy

#Skriv in det nya namnet som sakll nyttjas (Samma som Certet man nyttjar tex remote.kundnamn.se; returnerar 0
iwmi -Class "Win32_RDMSDeploymentSettings" -Namespace "root\CIMV2\rdms" -Name "SetStringProperty" -ArgumentList @("DeploymentRedirectorServer",$ClientAccessName) -ComputerName $ConnectionBroker -Authentication PacketPrivacy -ErrorAction Stop

# kollar igen så vi lyckades ändrad namnet...
iwmi -Class "Win32_RDMSDeploymentSettings" -Namespace "root\CIMV2\rdms" -Name "GetStringProperty" -ArgumentList @("DeploymentRedirectorServer") -ComputerName $ConnectionBroker -Authentication PacketPrivacy

}

RDGateway

RD-Gateway

Install RD Gateway with Powershell fast.. (2012R2)
Certs needs to be fixed and firewall ports needs to be opened and Nated … 443…

# Add Windows Role/Feature
Add-WindowsFeature -Name RDS-gateway -IncludeAllSubFeature -IncludeManagementTools

#verifiy that the module is present … and Load it…
Get-Module remotedesktopservices
import-module remotedesktopservices

 

# Create AD Security Group – Is created in Defalut ”users” container.
new-adgroup -Name ”RD-GW-Users” -Groupscope Global
Add-ADGroupMember ”RD-GW-Users” -member ”Domain Admins”
# Get Domain we are running in.. (Just to get things dynamic)
$dom=get-addomain | Select Name # $dom.name give us the domain name from now on..

#change dir into rds provider
cd RDS:
# Create new Connection Authorization Policy (CAP)
New-Item -Path ”RDS:\GatewayServer\CAP” -Name ”Allow RD-GW-Users” -UserGroups ”RD-GW-Users@$($dom.name)” -AuthMethod 1
# Create new Resource Authorization Policy
New-Item -Path ”RDS:\GatewayServer\RAP” -Name ”Allow Connections To Everywhere” -UserGroups ”RD-GW-Users@$($dom.name)” -ComputerGroupType 2

Windows Image Clean up – DISM

Renas ut gamla uppdateringar i WinSxS folder på olika Windows varianter…


Windows 7 – 2008 R2

%windir%\system32\dism.exe /Online /Cleanup-Image /spsuperseded


Windows 8.1 – 2012 R2

Dism.exe /online /Cleanup-Image /StartComponentCleanup
(Tog 2014-04-13cirka 40 min att köra på min Win8.1 I7 ResultatFöre: 23.4 GB Efter: 21.3 2Gb of data removed 🙂 )

Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
”All existing service packs and updates cannot be uninstalled after this command is completed.”
(Tog 2014-04-13 10 min på min 2012 R2… Resultat Före:14.9 GB Efter: 14.6 … not so big deal…)

Dism.exe /online /Cleanup-Image /SPSuperseded
Tar bort möjligheten till att avinstallera ett Service pack… om något sådan nu finns…


Rättigheter och Owners ICACLS

Ibland är det problem med rättigheter på kunders mappar etc.
Har länge behövt ett smidigt sätt att resetta detta enkelt.
Så här kommer en början…

rem Ger admin owner rättigheter i mappen och undermapparna
set p=”c:\Windows\servicing\Version”
takeown.exe /f %p% /R /A
icacls.exe %p% /grant:r administrators:(oi)(ci)f /t