UNC path failure

Hi All,

I have migrated a few shares to shares02,

now we have two shares with the name called groups, this means users no longer have access to one of the groups, therefore we have changed the name to groups2 and shared it.

what is the quickest way to map this to users machine?

I need a powershell script to say

if the unc path is groups, e.g \\shares02\groups, change it to \\shares02\groups2\....

thank you in advance,
Kelly GarciaSenior Systems AdministratorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kelly GarciaSenior Systems AdministratorAuthor Commented:
I have written this script, I need to replace the group with groups2:

foreach ($computer in $Computers)


if(Test-Connection -ComputerName $Computer -Count 1 -Quiet) {

$s=Get-WmiObject Win32_MappedLogicalDisk -computername $computer | ? {$_.providername -like "\\sreadvfile03\groups*"}



Open in new window

Shaun VermaakTechnical SpecialistCommented:
Do you have Active Directory? Would be easier to do this with AD GPO Drive Map Preferences

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Shaun VermaakTechnical SpecialistCommented:
Did these two Group shares come from two servers? If so DFS Consolidation Root would have been the right option
Kelly GarciaSenior Systems AdministratorAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.