I need to read the registry of a computer for a specific string in a network drive mapping, if it's found I need to pipe the computername.txt to a specific location on the network.
I modified a script I found to look at the registry key for the current user and modify the key based on this string, but it's become a much larger project with several thousand computers and I need to be able to pass the info to the teams that support computers that I don't.
Sure, here's the script edited to remove organization specifics
Get-ItemProperty -Path HKCU:\Network\Z RemotePath | %{set-itemproperty -Path $.PSPath RemotePath -Value ( $.RemotePath -Replace "oldtext", "newtext" )}
I need to trigger the creation of a text file using the computer name if the old text is found and copy it to a network location.