Power Shell or VB script
- or -
Post a project like this$$$
- Posted:
- Proposals: 2
- Remote
- #1799247
- Expired
Description
Experience Level: Expert
I have a PS script that looks at the host name and then copies files and renames based on the host name. Here is the script.
#$hostname = $env:computername
Copy-Item -Path "\\cscb-cifs\cifs_root\VDI\Teller\Ooltewah\$hostname.ini" -Destination 'C:\Users\Public\Rocket Software\LegaSuite Windows Client\7.2456.1.34\production\legasuite.ini'
Copy-Item -Path "\\cscb-cifs\cifs_root\VDI\Teller\Ooltewah\$hostname.WS" -Destination 'C:\Users\Public\Desktop\Teller.WS'
I would like to be able to look at reg key:
HKEY_CURRENT_USER\Volatile Environment\ViewClient_Machine_Name
and use this entry to copy the file.
So for example if the HKEY_CURRENT_USER\Volatile Environment\ViewClient_Machine_Name
is vdi-hix-001 then it would look at the share and copy the correct file based on the above script.
does that make sense?
Thanks
mark
#$hostname = $env:computername
Copy-Item -Path "\\cscb-cifs\cifs_root\VDI\Teller\Ooltewah\$hostname.ini" -Destination 'C:\Users\Public\Rocket Software\LegaSuite Windows Client\7.2456.1.34\production\legasuite.ini'
Copy-Item -Path "\\cscb-cifs\cifs_root\VDI\Teller\Ooltewah\$hostname.WS" -Destination 'C:\Users\Public\Desktop\Teller.WS'
I would like to be able to look at reg key:
HKEY_CURRENT_USER\Volatile Environment\ViewClient_Machine_Name
and use this entry to copy the file.
So for example if the HKEY_CURRENT_USER\Volatile Environment\ViewClient_Machine_Name
is vdi-hix-001 then it would look at the share and copy the correct file based on the above script.
does that make sense?
Thanks
mark
Mark L.
100% (2)Projects Completed
2
Freelancers worked with
1
Projects awarded
33%
Last project
31 Dec 2017
United States
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies