Well, here are some raw material to get things started.
(I apologize if any of this is already common knowledge.)
You could enumerate the user profile folders:
$UserProfiles = (Get-ChildItem C:\Users)
FOREACH ($User in $UserProfiles)
{
$UserName = $User.Name
IF ($UserName -ne "Public")
{
New-Item -Path "D:\Backups\$UserName" -ItemType Directory -Force
Copy-Item -Path "C:\Users\$UserName\Favorites" -Destination
"D:\Backups\$UserName" -Force -Recurse
}
}
This will work as long as everything is "out of the box" and you're not
redirecting folders, which it sounds like you're not.
If you are, then you can enumerate the Registry.
The location of the user's Favorites is kept here in the Registry:
'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders'
'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders'
So you could enumerate the HKUsers hive and extract the location of the folder.
Then copy that folder to your backup location.
Mike
From: [email protected] [mailto:[email protected]] On
Behalf Of Timothy Ransom
Sent: Tuesday, November 3, 2015 2:53 PM
To: [email protected]
Subject: [mssms] RE: batch or script to backup every user profile's favorites
folder locally
This is just a one-time backup only for the IE11 upgrade and must be local - no
other space is available.
I expect to have 99% success rate but must be able to restore favorites if lost
in the upgrade.
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Jimmy Martin
Sent: Tuesday, November 3, 2015 2:43 PM
To: [email protected]<mailto:[email protected]>
Subject: [mssms] RE: batch or script to backup every user profile's favorites
folder locally
Why not do folder redirection for that?
Jimmy Martin
(901) 227-8209
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Timothy Ransom
Sent: Tuesday, November 03, 2015 1:41 PM
To: [email protected]<mailto:[email protected]>
Subject: [mssms] batch or script to backup every user profile's favorites
folder locally
Hi,
Does anyone have a batch or script to backup each user profile's favorites
folder locally?
I need to verify a local backup of every user profile's favorites folder prior
to IE11 upgrade on Windows 7 x64.
Thanks,
Tim
*** GEORGIA DEPARTMENT OF LABOR ***
****** CONFIDENTIALITY NOTICE ******
This transmission may contain confidential information protected by state or
federal law.
The information is intended only for use consistent with the state business
discussed in this transmission.
If you are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution, or the taking of any action based on the
contents is strictly prohibited.
If you have received this transmission in error, please delete this email and
notify the sender immediately.
Your cooperation is appreciated.
This message and any files transmitted with it may contain legally privileged,
confidential, or proprietary information. If you are not the intended recipient
of this message, you are not permitted to use, copy, or forward it, in whole or
in part without the express consent of the sender. Please notify the sender of
the error by reply email, disregard the foregoing messages, and delete it
immediately.
P Please consider the environment before printing this email...
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be
used for urgent or sensitive issues