How to get the URLS from IE Favorites using PowerShell

This is real quick and dirty but is very useful if you are trying to migrate from Windows to Linux.

[array]$a = (Get-ChildItem ‘C:\Users\biprentice\Favorites\’ -Recurse -Filter ‘*.url’ | Get-Content)

foreach ($t in $a)

{

if (($t.ToString()) -like “URL=http*”)

{(($t.ToString())).Substring(4) | Out-File ‘c:\urlexport.txt’ -Append }

}

Advertisements

Comments are closed.