Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users/vinca/bugfix #2053

Merged
merged 8 commits into from
Jul 12, 2016
16 changes: 14 additions & 2 deletions Tasks/WindowsMachineFileCopy/RoboCopyJob.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,19 @@ param (
ThrowError -errorMessage (Get-LocalizedString -Key "Parameter '{0}' cannot be null or empty." -ArgumentList "credential")
}
}


function Get-DownLevelLogonName(
[string]$fqdn,
[string]$userName
)
{
if($userName -like '.\*') {
$userName = $userName.replace(".\","\")
$userName = $fqdn+$userName
}
return $userName
}

function Replace-First(
[string]$text,
[string]$search,
Expand Down Expand Up @@ -153,7 +165,7 @@ param (
$destinationNetworkPath = Get-DestinationNetworkPath -targetPath $targetPath -machineShare $machineShare

Validate-Credential $credential
$userName = $($credential.UserName)
$userName = Get-DownLevelLogonName -fqdn $fqdn -userName $($credential.UserName)
$password = $($credential.Password)

if($machineShare)
Expand Down
2 changes: 1 addition & 1 deletion Tasks/WindowsMachineFileCopy/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 1,
"Minor": 0,
"Patch": 32
"Patch": 33
},
"minimumAgentVersion": "1.102.0",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/WindowsMachineFileCopy/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 1,
"Minor": 0,
"Patch": 32
"Patch": 33
},
"minimumAgentVersion": "1.102.0",
"groups": [
Expand Down