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
Kelly GarciaSenior Systems AdministratorAsked:
Who is Participating?
 
Shaun VermaakTechnical Specialist/DeveloperCommented:
Do you have Active Directory? Would be easier to do this with AD GPO Drive Map Preferences
0
 
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

0
 
Shaun VermaakTechnical Specialist/DeveloperCommented:
Did these two Group shares come from two servers? If so DFS Consolidation Root would have been the right option
http://blogs.inframon.com/2016/07/using-dfs-consolidation-root-to-migrate-file-servers-to-new-hosts-using-old-share-names/
0
 
Kelly GarciaSenior Systems AdministratorAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.