#Backup a users favorites
Function Backup-Favorites
    {
        $User = $env:username
        $Desktop = Get-DesktopFolder
        $UserFolder = "C:\users\$User"
        $Favorites = @()
        $FavoritesSaveFolder = "$Desktop\My Favorites"
        If ((Test-Path $FavoritesSaveFolder) -eq $False) {New-Item -Path $FavoritesSaveFolder -ItemType Directory | Out-Null} 
        $Favorites += "$UserFolder\AppData\Local\Google\Chrome\User Data\Default\bookmarks"        #Chrome
        $Favorites += "$UserFolder\AppData\Local\Microsoft\Edge\User Data\Default\bookmarks"       #Edge
        $Favorites += "$UserFolder\Favorites\*.*"                                                  #Internet Explorer
        $Favorites += "$UserFolder\AppData\Roaming\Mozilla\FireFox\Profiles\*.*"                   #FireFox
        ForEach ($Item in $Favorites)
            {
                $Folder = (Get-Item $Item).DirectoryName
                If ($Folder -eq $null) {$Folder = ((Get-Item $Item).Parent).FullName | Sort-Object -Unique}
                If ((Test-Path $Folder) -eq $True) 
                    {
                        $MakeFolder = $Folder.Replace("C:\users\","")
                        $NewFolderName = "$FavoritesSaveFolder\$MakeFolder"
                        If ((Test-Path $NewFolderName) -eq $False) {New-Item -Path "$NewFolderName" -ItemType Directory | Out-Null}
                    }
                Copy-Item "$Item" "$NewFolderName" -Recurse -Force
                
            }
        Start-Pause -Message1 "Backup Complete" -Message2 "Congratulations" -Seconds 2
    }