Edit

Share via


Get-AzDataFactoryV2LinkedService

Gets information about linked services in Data Factory.

Syntax

ByFactoryName (Default)

Get-AzDataFactoryV2LinkedService
    [[-Name] <String>]
    [-ResourceGroupName] <String>
    [-DataFactoryName] <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByFactoryObject

Get-AzDataFactoryV2LinkedService
    [[-Name] <String>]
    [-DataFactory] <PSDataFactory>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByResourceId

Get-AzDataFactoryV2LinkedService
    [-ResourceId] <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Get-AzDataFactoryV2LinkedService cmdlet gets information about linked services in Azure Data Factory. If you specify the name of a linked service, this cmdlet gets information about that linked service. If you do not specify a name, this cmdlet gets information about all the linked services in the data factory.

Examples

Example 1: Get information about all linked services

Get-AzDataFactoryV2LinkedService -ResourceGroupName "ADF" -DataFactoryName "WikiADF" | Format-List
LinkedServiceName : LinkedServiceCuratedWikiData
    ResourceGroupName : ADF
    DataFactoryName   : WikiADF
    Properties        : Microsoft.Azure.Management.DataFactory.Models.AzureStorageLinkedService

    LinkedServiceName : LinkedServiceHDIStorage
    ResourceGroupName : ADF
    DataFactoryName   : WikiADF
    Properties        : Microsoft.Azure.Management.DataFactory.Models.AzureStorageLinkedService

    LinkedServiceName : LinkedServiceWikipediaClickEvents
    ResourceGroupName : ADF
    DataFactoryName   : WikiADF
    Properties        : Microsoft.Azure.Management.DataFactory.Models.AzureStorageLinkedService

This command gets information about all linked services in the data factory named WikiADF, and then passes the linked services to the Format-List cmdlet by using the pipeline operator. That Windows PowerShell cmdlet formats the results. For more information, type Get-Help Format-List. You can use either one of the following ways:

Example 2: Get information about a specific linked service

Get-AzDataFactoryV2LinkedService -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name "LinkedServiceCuratedWikiData"
LinkedServiceName : LinkedServiceCuratedWikiData
    ResourceGroupName : ADF
    DataFactoryName   : WikiADF
    Properties        : Microsoft.Azure.Management.DataFactory.Models.AzureStorageLinkedService

This command gets information about the linked service named LinkedServiceCuratedWikiData in the data factory named WikiADF.

Example 3: Get information about a specific linked service by specifying the DataFactory parameter

$DataFactory = Get-AzDataFactoryV2 -ResourceGroupName "ADF" -Name "ContosoFactory"
Get-AzDataFactoryV2LinkedService -DataFactory $DataFactory | Format-Table -Property Name, DataFactoryName, ResourceGroupName
Name                          DataFactoryName ResourceGroupName
     ----                          --------------- -----------------
     LinkedServiceCuratedWikiData  ContosoFactory  ADF

The first command uses the Get-AzDataFactoryV2 cmdlet to get the data factory named ContosoFactory, and then stores it in the $DataFactory variable. The second command gets information about the linked service for the data factory stored in $DataFactory, and then passes that information to the Format-Table cmdlet by using the pipeline operator. The Format-Table cmdlet formats the output as a dataset with the specified properties as dataset columns.

Parameters

-DataFactory

Specifies a PSDataFactory object. This cmdlet gets linked services that belong to the data factory that this parameter specifies.

Parameter properties

Type:PSDataFactory
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByFactoryObject
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-DataFactoryName

Specifies the name of a data factory. This cmdlet gets linked services that belong to the data factory that this parameter specifies.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByFactoryName
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of the linked service about which to get information.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:LinkedServiceName

Parameter sets

ByFactoryName
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByFactoryObject
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ResourceGroupName

Specifies the name of an Azure resource group. This cmdlet gets linked services that belong to the group that this parameter specifies.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByFactoryName
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ResourceId

The Azure resource ID.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByResourceId
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

PSDataFactory

Outputs

PSLinkedService

Notes

Keywords: azure, azurerm, arm, resource, management, manager, data, factories