0
我需要在Azure中运行手册使用波纹管命令的文件目录:如何通过JSON对象本身,而不是通过使用新AzureRmDataFactoryLinkedService
New-AzureRmDataFactoryLinkedService $MyDataFactoryObject -File "PATH/TO/JSON/STRING/FILE"
我想知道是否有可能通过JSON对象本身,而不是传递文件路径?
我的意思是这样的:
$StorageLinkedService_JSON_str = '{
"name": "StorageName",
"properties": {
"type": "AzureStorage",
"description": "",
"typeProperties": {
"connectionString": "connectionString"
}
}
}'
$StorageLinkedService_Obj = ConvertFrom-Json -InputObject $StorageLinkedService_JSON_str
# I need to know is it possible to use one of these lines?
# New-AzureRmDataFactoryLinkedService $MyDataFactoryObject -File $StorageLinkedService_JSON_str
# OR This:
# New-AzureRmDataFactoryLinkedService $MyDataFactoryObject -File $StorageLinkedService_Obj
据微软文档[ New-AzureRmDataFactoryLinkedService](https://docs.microsoft.com/de-de/powershell/module/azurerm.datafactories/new-azurermdatafactorylinkedservice?view=azurermps-4.4.0)'-File'参数需要指向json文件。没有其他的。所以不行。没有这条线会起作用。 –