Hi all,
I'm not very experienced with PowerShell. But I've downloaded a solution which calls a .ps1 file. I've changed some small things to let it work with my local paths. But now it containts this:
$AdfPath = "C:\Program Files\WindowsPowerShell\Modules\azure.datafactory.tools\0.17.0\public"
$opt.CreateNewInstance = $true
$opt.DeleteNotInSource = $false
$opt.StopStartTriggers = $true
Publish-AdfV2FromJson -RootFolder $AdfPath `
-ResourceGroupName $resourceGroupName `
-DataFactoryName $dataFactoryName `
-Location $region `
-Option $opt `
-Stage $configFilePath
And the output is this error:
Update-PropertiesFromFile : Could not find object: linkedService.SupportDatabase
At C:\Program Files\WindowsPowerShell\Modules\azure.datafactory.tools\0.17.0\public\Publish-AdfV2FromJson.ps1:160 char:9
+ Update-PropertiesFromFile -adf $adf -stage $Stage -option $op ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Update-PropertiesFromFile
The property 'Body' cannot be found on this object. Verify that the property exists.
At C:\Program Files\WindowsPowerShell\Modules\azure.datafactory.tools\0.17.0\private\Update-PropertiesFromFile.ps1:68 char:9
+ $json = $o.Body
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict
The variable '$json' cannot be retrieved because it has not been set.
At C:\Program Files\WindowsPowerShell\Modules\azure.datafactory.tools\0.17.0\private\Update-PropertiesFromFile.ps1:69 char:23
+ if ($null -eq $json) {
+ ~~~~~
+ CategoryInfo : InvalidOperation: (json:String) [], RuntimeException
+ FullyQualifiedErrorId : VariableIsUndefined
Update-PropertiesFromFile : Wrong path defined in config for object(path): linkedService.SupportDatabase(properties.typeProperties.connectionString.secretName)
At C:\Program Files\WindowsPowerShell\Modules\azure.datafactory.tools\0.17.0\public\Publish-AdfV2FromJson.ps1:160 char:9
+ Update-PropertiesFromFile -adf $adf -stage $Stage -option $op ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], DataException
+ FullyQualifiedErrorId : System.Data.DataException,Update-PropertiesFromFile
The variable '$json' cannot be retrieved because it has not been set.
At C:\Program Files\WindowsPowerShell\Modules\azure.datafactory.tools\0.17.0\private\Update-PropertiesFromFile.ps1:88 char:44
+ Update-ObjectProperty -obj $json -path "properties.$p ...
+ ~~~~~
+ CategoryInfo : InvalidOperation: (json:String) [], RuntimeException
+ FullyQualifiedErrorId : VariableIsUndefined
Save-AdfObjectAsFile : Cannot bind argument to parameter 'obj' because it is null.
At C:\Program Files\WindowsPowerShell\Modules\azure.datafactory.tools\0.17.0\private\Update-PropertiesFromFile.ps1:104 char:41
+ $f = (Save-AdfObjectAsFile -obj $o)
+ ~~
+ CategoryInfo : InvalidData: (:) [Save-AdfObjectAsFile], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Save-AdfObjectAsFile
The variable '$f' cannot be retrieved because it has not been set.
At C:\Program Files\WindowsPowerShell\Modules\azure.datafactory.tools\0.17.0\private\Update-PropertiesFromFile.ps1:105 char:23
+ $o.FileName = $f
+ ~~
+ CategoryInfo : InvalidOperation: (f:String) [], RuntimeException
+ FullyQualifiedErrorId : VariableIsUndefined
I've checked C:\Program Files\WindowsPowerShell\Modules\azure.datafactory.tools\0.17.0\public\Publish-AdfV2FromJson.ps1 and it contains. Line 160 contains:
Update-PropertiesFromFile -adf $adf -stage $Stage -option $opt
Is there anybody who can help me? What is going wrong here?