Horje
powershell copy-item specify credentials Code Example
powershell copy-item specify credentials
$Source = "C:\Downloads\myfile.txt"
$Dest   = "\\10.149.12.162\c$\skumar"
$Username = "administrator"
$Password = ConvertTo-SecureString "Complex_Passw0rd" -AsPlainText -Force
$mycreds = New-Object System.Management.Automation.PSCredential($Username, $Password)

New-PSDrive -Name J -PSProvider FileSystem -Root $Dest -Credential $mycreds -Persist
Copy-Item -Path $Source -Destination "J:\myfile.txt"




Shell

Related
changing folder permission in linux Code Example changing folder permission in linux Code Example
feature branch naming convention git Code Example feature branch naming convention git Code Example
fetching a forked branch Code Example fetching a forked branch Code Example
removing letstencrypt from domain Code Example removing letstencrypt from domain Code Example
tar exclude directory Code Example tar exclude directory Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9