Jump to content
TechnicalHero

Transferring a file from LT Share

Recommended Posts

Hi All,

All I want to do st transfer a .dll from my LTShare to C:\Windows\LTSvc\packages\PowerShellScripts. Seemingly this is a bit tricky.

I can transfer it to C:\Users\LocalUser\Downloads\PowerShellScripts using PowerShells "Copy-Item" But I am not going to know the path of "LocalUser". There doesn't seem to be a variable for "User Profile" that I can specify. If there was, then job done.

Any idea how I can expose what the current logged in users profile path is and how to then cope ONE FILE to it?!

Any assistance would be great appreciated 🙂

image.thumb.png.03f4ecfd8cce2ec69cd1d572d9ab8ca4.png

Kind regards,

 

 

 

 

Share this post


Link to post
Share on other sites

Try to see if you can pass this to the script:

$cred = Get-Credential UserTo.RunAs

OR

$username = $env:username

So it goes something like this:

C:\Users\$username\Downloads\PowerShellScripts 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×