MikeBatters
Technical User
I am hoping someone can help becuase i can't find a way of doing this.
I am trying to write a script that will read through all the users in the AD or an OU checking if the ProfilePath or TerminalServicesProfilePath begins with a specific sting (\\servername\) so that i can replace it with a new string (\\server2\).
I have got the script to replace the characters in the fields but i cannot work out how to search in the first place.
My plan was to search and when a user matches the criteria write the username to an array so that i can use the array later in a For Each loop to write the changes back.
Any help with this would be really appreicated and i am not too proud to copy a script that already does all of this if someone has written this already and if feeling kind enough to share.
Thanks in Advance
Mike
*************************************
Remember - There is always another way..........I just haven't found out what it is yet!
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)
I am trying to write a script that will read through all the users in the AD or an OU checking if the ProfilePath or TerminalServicesProfilePath begins with a specific sting (\\servername\) so that i can replace it with a new string (\\server2\).
I have got the script to replace the characters in the fields but i cannot work out how to search in the first place.
My plan was to search and when a user matches the criteria write the username to an array so that i can use the array later in a For Each loop to write the changes back.
Any help with this would be really appreicated and i am not too proud to copy a script that already does all of this if someone has written this already and if feeling kind enough to share.
Thanks in Advance
Mike
*************************************
Remember - There is always another way..........I just haven't found out what it is yet!
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)