New
#31
This PowerShell will summarize the targets of the folders under This PC:
Sample OUtput:Code:$Shell = New-Object -ComObject shell.application $shell.NameSpace(17).Items() | Where Type -eq 'System Folder' | select name , path
and this will give you a little more info:Code:PS C:\> $shell.NameSpace(17).Items() | Where Type -eq 'System Folder' | select name , path Name Path ---- ---- Downloads C:\Users\keith\Downloads Pictures C:\Users\keith\Pictures Music C:\Users\keith\Music Desktop C:\Users\keith\Desktop Documents C:\Users\keith\Documents Videos C:\Users\keith\Videos
Sample Output:Code:$Shell = New-Object -ComObject shell.application $FD = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions' $ThisPC_ID = '{20D04FE0-3AEA-1069-A2D8-08002B30309D}\' gci $fd -pv pvKey | gp | ? Category -eq 4 | ? ParsingName -like "*$ThisPC_ID*" | %{ $oFolder = $shell.Namespace($_.ParsingName) Try { $PCPolicy = $pvKey.OpenSubKey('PropertyBag').GetValue('ThisPCPolicy') } Catch { $PCPolicy = 'None' } [PSCustomObject]@{ 'Name' = $oFolder.Title 'Path' = $oFolder.Self.Path 'KnownFolderName' = $_.Name 'ThisPCPolicy' = $PCPolicy 'KnownFolderID' = $_.PSChildName } } | Sort ThisPCPolicy -Descending | Out-GridView
Some of his information may be buried in all these "wall-of-Text" replies, but I'm not wasting what little vision I have left looking for it.
Last edited by KeithM; 24 Mar 2021 at 00:11.