다음을 통해 공유


Windows PowerShell 컨테이너 공급자 만들기

이 항목에서는 다중 계층 데이터 저장소에서 작업할 수 있는 Windows PowerShell 공급자를 만드는 방법에 대해 설명합니다. 이 유형의 데이터 저장소의 경우 저장소의 최상위 수준에는 루트 항목이 포함되며 각 후속 수준을 자식 항목의 노드라고 합니다. 사용자가 이러한 자식 노드에서 작업할 수 있도록 함으로써 사용자는 데이터 저장소를 통해 계층적으로 상호 작용할 수 있습니다.

다중 수준 데이터 저장소에서 작업할 수 있는 공급자를 Windows PowerShell 컨테이너 공급자라고 합니다. 그러나 Windows PowerShell 컨테이너 공급자는 하나의 컨테이너(중첩된 컨테이너 없음)에 항목이 있는 경우에만 사용할 수 있습니다. 중첩된 컨테이너가 있는 경우 Windows PowerShell 탐색 공급자를 구현해야 합니다. Windows PowerShell 탐색 공급자를 구현하는 방법에 대한 자세한 내용은 Windows PowerShell 탐색 공급자만들기를 참조하세요.

비고

Windows Vista 및 .NET Framework 3.0 런타임 구성 요소용 Microsoft Windows 소프트웨어 개발 키트를 사용하여 이 공급자에 대한 C# 소스 파일(AccessDBSampleProvider04.cs)을 다운로드할 수 있습니다. 다운로드 지침은 Windows PowerShell을 설치하고 Windows PowerShell SDK다운로드하는 방법을 참조하세요. 다운로드한 원본 파일은 <PowerShell 샘플> 디렉터리에서 사용할 수 있습니다. 다른 Windows PowerShell 공급자 구현에 대한 자세한 내용은 windows PowerShell 공급자 디자인하는참조하세요.

여기에 설명된 Windows PowerShell 컨테이너 공급자는 데이터베이스의 테이블과 행을 컨테이너의 항목으로 정의하여 데이터베이스를 단일 컨테이너로 정의합니다.

주의

이 디자인에서는 이름 ID가 있는 필드가 있고 필드 형식이 LongInteger인 데이터베이스를 가정합니다.

Windows PowerShell 컨테이너 공급자 클래스 정의

Windows PowerShell 컨테이너 공급자는 System.Management.Automation.Provider.ContainerCmdletProvider 기본 클래스에서 파생되는 .NET 클래스를 정의해야 합니다. 다음은 이 섹션에서 설명하는 Windows PowerShell 컨테이너 공급자에 대한 클래스 정의입니다.

[CmdletProvider("AccessDB", ProviderCapabilities.None)]
public class AccessDBProvider : ContainerCmdletProvider

이 클래스 정의에서 System.Management.Automation.Provider.CmdletProviderAttribute 특성에는 두 개의 매개 변수가 포함됩니다. 첫 번째 매개 변수는 Windows PowerShell에서 사용하는 공급자에 대한 사용자 친화적인 이름을 지정합니다. 두 번째 매개 변수는 명령 처리 중에 공급자가 Windows PowerShell 런타임에 노출하는 Windows PowerShell 특정 기능을 지정합니다. 이 공급자의 경우 추가되는 Windows PowerShell 특정 기능이 없습니다.

기본 기능 정의

Windows PowerShell 공급자 디자인하는설명한 대로 system.Management.Automation.Provider.ContainerCmdletProvider 클래스 다른 공급자 기능을 제공하는 다른 여러 클래스에서 파생됩니다. 따라서 Windows PowerShell 컨테이너 공급자는 해당 클래스에서 제공하는 모든 기능을 정의해야 합니다.

세션별 초기화 정보를 추가하고 공급자가 사용하는 리소스를 해제하는 기능을 구현하려면 기본 Windows PowerShell 공급자만들기를 참조하세요. 그러나 대부분의 공급자(여기에 설명된 공급자 포함)는 Windows PowerShell에서 제공하는 이 기능의 기본 구현을 사용할 수 있습니다.

데이터 저장소에 액세스하려면 공급자가 System.Management.Automation.Provider.DriveCmdletProvider 기본 클래스의 메서드를 구현해야 합니다. 이러한 메서드를 구현하는 방법에 대한 자세한 내용은 Windows PowerShell 드라이브 공급자만들기를 참조하세요.

데이터 저장소의 항목(예: 항목 가져오기, 설정 및 지우기)을 조작하려면 공급자가 System.Management.Automation.Provider.ItemCmdletProvider 기본 클래스에서 제공하는 메서드를 구현해야 합니다. 이러한 메서드를 구현하는 방법에 대한 자세한 내용은 Windows PowerShell 항목 공급자만들기를 참조하세요.

자식 항목 검색

자식 항목을 검색하려면 Windows PowerShell 컨테이너 공급자가 Get-ChildItem cmdlet의 호출을 지원하도록 System.Management.Automation.Provider.ContainerCmdletProvider.GetChildItems* 메서드를 재정의해야 합니다. 이 메서드는 데이터 저장소에서 자식 항목을 검색하고 개체로 파이프라인에 씁니다. cmdlet의 recurse 매개 변수를 지정하면 메서드는 수준에 관계없이 모든 자식을 검색합니다. recurse 매개 변수를 지정하지 않으면 메서드는 단일 수준의 자식만 검색합니다.

다음은 이 공급자에 대한 System.Management.Automation.Provider.ContainerCmdletProvider.GetChildItems* 메서드의 구현입니다. 이 메서드는 경로가 Access 데이터베이스를 나타내는 경우 모든 데이터베이스 테이블의 자식 항목을 검색하고 경로가 데이터 테이블을 나타내는 경우 해당 테이블의 행에서 자식 항목을 검색합니다.

protected override void GetChildItems(string path, bool recurse)
{
    // If path represented is a drive then the children in the path are 
    // tables. Hence all tables in the drive represented will have to be
    // returned
    if (PathIsDrive(path))
    {
        foreach (DatabaseTableInfo table in GetTables())
        {
            WriteItemObject(table, path, true);

            // if the specified item exists and recurse has been set then 
            // all child items within it have to be obtained as well
            if (ItemExists(path) && recurse)
            {
                GetChildItems(path + pathSeparator + table.Name, recurse);
            }
        } // foreach (DatabaseTableInfo...
    } // if (PathIsDrive...
    else
    {
        // Get the table name, row number and type of path from the
        // path specified
        string tableName;
        int rowNumber;

        PathType type = GetNamesFromPath(path, out tableName, out rowNumber);

        if (type == PathType.Table)
        {
            // Obtain all the rows within the table
            foreach (DatabaseRowInfo row in GetRows(tableName))
            {
                WriteItemObject(row, path + pathSeparator + row.RowNumber,
                        false);
            } // foreach (DatabaseRowInfo...
        }
        else if (type == PathType.Row)
        {
            // In this case the user has directly specified a row, hence
            // just give that particular row
            DatabaseRowInfo row = GetRow(tableName, rowNumber);
            WriteItemObject(row, path + pathSeparator + row.RowNumber,
                        false);
        }
        else
        {
            // In this case, the path specified is not valid
            ThrowTerminatingInvalidPathException(path);
        }
    } // else
} // GetChildItems

GetChildItems 구현에 대해 기억해야 할 사항

다음 조건은 System.Management.Automation.Provider.ContainerCmdletProvider.GetChildItems*구현에 적용될 수 있습니다.

Get-ChildItem Cmdlet에 동적 매개 변수 연결

경우에 따라 System.Management.Automation.Provider.ContainerCmdletProvider.GetChildItems* 호출하는 Get-ChildItem cmdlet에는 런타임 시 동적으로 지정된 추가 매개 변수가 필요합니다. 이러한 동적 매개 변수를 제공하려면 Windows PowerShell 컨테이너 공급자가 system.Management.Automation.Provider.ContainerCmdletProvider.GetChildItemsDynamicParameters* 메서드를 구현해야 합니다. 이 메서드는 표시된 경로에서 항목에 대한 동적 매개 변수를 검색하고 cmdlet 클래스 또는 System.Management.Automation.RuntimeDefinedParameterDictionary 개체와 유사한 구문 분석 특성이 있는 속성과 필드가 있는 개체를 반환합니다. Windows PowerShell 런타임은 반환된 개체를 사용하여 매개 변수를 Get-ChildItem cmdlet에 추가합니다.

이 Windows PowerShell 컨테이너 공급자는 이 메서드를 구현하지 않습니다. 그러나 다음 코드는 이 메서드의 기본 구현입니다.

자식 항목 이름 검색

자식 항목의 이름을 검색하려면 Windows PowerShell 컨테이너 공급자가 Name 매개 변수를 지정할 때 Get-ChildItem cmdlet의 호출을 지원하도록 System.Management.Automation.Provider.ContainerCmdletProvider.GetChildNames* 메서드를 재정의해야 합니다. 이 메서드는 cmdlet의 returnAllContainers 매개 변수가 지정된 경우 모든 컨테이너의 지정된 경로 또는 자식 항목 이름에 대한 자식 항목의 이름을 검색합니다. 자식 이름은 경로의 리프 부분입니다. 예를 들어 경로 C:\windows\system32\abc.dll 자식 이름은 "abc.dll"입니다. 디렉터리 C:\windows\system32의 자식 이름은 "system32"입니다.

다음은 이 공급자에 대한 System.Management.Automation.Provider.ContainerCmdletProvider.GetChildNames* 메서드의 구현입니다. 지정된 경로가 Access 데이터베이스(드라이브)를 나타내는 경우 메서드는 테이블 이름을 검색하고 경로가 테이블을 나타내는 경우 행 번호를 검색합니다.

protected override void GetChildNames(string path,
                              ReturnContainers returnContainers)
{
    // If the path represented is a drive, then the child items are
    // tables. get the names of all the tables in the drive.
    if (PathIsDrive(path))
    {
        foreach (DatabaseTableInfo table in GetTables())
        {
            WriteItemObject(table.Name, path, true);
        } // foreach (DatabaseTableInfo...
    } // if (PathIsDrive...
    else
    {
        // Get type, table name and row number from path specified
        string tableName;
        int rowNumber;

        PathType type = GetNamesFromPath(path, out tableName, out rowNumber);

        if (type == PathType.Table)
        {
            // Get all the rows in the table and then write out the 
            // row numbers.
            foreach (DatabaseRowInfo row in GetRows(tableName))
            {
                WriteItemObject(row.RowNumber, path, false);
            } // foreach (DatabaseRowInfo...
        }
        else if (type == PathType.Row)
        {
            // In this case the user has directly specified a row, hence
            // just give that particular row
            DatabaseRowInfo row = GetRow(tableName, rowNumber);

            WriteItemObject(row.RowNumber, path, false);
        }
        else
        {
            ThrowTerminatingInvalidPathException(path);
        }
    } // else
} // GetChildNames

GetChildNames 구현에 대해 기억해야 할 사항

다음 조건은 System.Management.Automation.Provider.ContainerCmdletProvider.GetChildItems*구현에 적용될 수 있습니다.

Get-ChildItem Cmdlet에 동적 매개 변수 연결(이름)

경우에 따라 Get-ChildItem cmdlet(Name 매개 변수 사용)에는 런타임에 동적으로 지정된 추가 매개 변수가 필요합니다. 이러한 동적 매개 변수를 제공하려면 Windows PowerShell 컨테이너 공급자가 system.Management.Automation.Provider.ContainerCmdletProvider.GetChildNamesDynamicParameters* 메서드를 구현해야 합니다. 이 메서드는 표시된 경로에서 항목에 대한 동적 매개 변수를 검색하고 cmdlet 클래스 또는 System.Management.Automation.RuntimeDefinedParameterDictionary 개체와 유사한 구문 분석 특성이 있는 속성과 필드가 있는 개체를 반환합니다. Windows PowerShell 런타임은 반환된 개체를 사용하여 매개 변수를 Get-ChildItem cmdlet에 추가합니다.

이 공급자는 이 메서드를 구현하지 않습니다. 그러나 다음 코드는 이 메서드의 기본 구현입니다.

항목 이름 바꾸기

항목의 이름을 바꾸려면 Windows PowerShell 컨테이너 공급자가 Rename-Item cmdlet의 호출을 지원하도록 System.Management.Automation.Provider.ContainerCmdletProvider.RenameItem* 메서드를 재정의해야 합니다. 이 메서드는 지정된 경로에 있는 항목의 이름을 제공된 새 이름으로 변경합니다. 새 이름은 항상 부모 항목(컨테이너)을 기준으로 해야 합니다.

이 공급자는 System.Management.Automation.Provider.ContainerCmdletProvider.RenameItem* 메서드를 재정의하지 않습니다. 그러나 다음은 기본 구현입니다.

RenameItem 구현에 대해 기억해야 할 사항

다음 조건은 System.Management.Automation.Provider.ContainerCmdletProvider.RenameItem*구현에 적용될 수 있습니다.

Rename-Item Cmdlet에 동적 매개 변수 연결

경우에 따라 Rename-Item cmdlet에는 런타임에 동적으로 지정된 추가 매개 변수가 필요합니다. 이러한 동적 매개 변수를 제공하려면 Windows PowerShell 컨테이너 공급자가 system.Management.Automation.Provider.ContainerCmdletProvider.RenameItemDynamicParameters* 메서드를 구현해야 합니다. 이 메서드는 표시된 경로에서 항목의 매개 변수를 검색하고 cmdlet 클래스 또는 System.Management.Automation.RuntimeDefinedParameterDictionary 개체와 유사한 구문 분석 특성이 있는 속성 및 필드가 있는 개체를 반환합니다. Windows PowerShell 런타임은 반환된 개체를 사용하여 매개 변수를 Rename-Item cmdlet에 추가합니다.

이 컨테이너 공급자는 이 메서드를 구현하지 않습니다. 그러나 다음 코드는 이 메서드의 기본 구현입니다.

새 항목 만들기

새 항목을 만들려면 컨테이너 공급자가 New-Item cmdlet의 호출을 지원하기 위해 System.Management.Automation.Provider.ContainerCmdletProvider.NewItem* 메서드를 구현해야 합니다. 이 메서드는 지정된 경로에 있는 데이터 항목을 만듭니다. cmdlet의 type 매개 변수에는 새 항목에 대한 공급자 정의 형식이 포함됩니다. 예를 들어 FileSystem 공급자는 값이 "file" 또는 "directory"인 type 매개 변수를 사용합니다. cmdlet의 newItemValue 매개 변수는 새 항목에 대한 공급자별 값을 지정합니다.

다음은 이 공급자에 대한 System.Management.Automation.Provider.ContainerCmdletProvider.NewItem* 메서드의 구현입니다.

protected override void NewItem( string path, string type, object newItemValue )
{
    // Create the new item here after
    // performing necessary validations
    //
    // WriteItemObject(newItemValue, path, false);

    // Example
    //
    // if (ShouldProcess(path, "new item"))
    // {
    //      // Create a new item and then call WriteObject
    //      WriteObject(newItemValue, path, false);
    // }

} // NewItem
{
    case 1:
        {
            string name = pathChunks[0];

            if (TableNameIsValid(name))
            {
                tableName = name;
                retVal = PathType.Table;
            }
        }
        break;

    case 2:
        {
            string name = pathChunks[0];

NewItem 구현에 대해 기억해야 할 사항

다음 조건은 System.Management.Automation.Provider.ContainerCmdletProvider.NewItem*구현에 적용될 수 있습니다.

New-Item Cmdlet에 동적 매개 변수 연결

경우에 따라 New-Item cmdlet에는 런타임에 동적으로 지정된 추가 매개 변수가 필요합니다. 이러한 동적 매개 변수를 제공하려면 컨테이너 공급자가 system.Management.Automation.Provider.ContainerCmdletProvider.NewItemDynamicParameters* 메서드를 구현해야 합니다. 이 메서드는 표시된 경로에서 항목의 매개 변수를 검색하고 cmdlet 클래스 또는 System.Management.Automation.RuntimeDefinedParameterDictionary 개체와 유사한 구문 분석 특성이 있는 속성 및 필드가 있는 개체를 반환합니다. Windows PowerShell 런타임은 반환된 개체를 사용하여 매개 변수를 New-Item cmdlet에 추가합니다.

이 공급자는 이 메서드를 구현하지 않습니다. 그러나 다음 코드는 이 메서드의 기본 구현입니다.

항목 제거

항목을 제거하려면 Windows PowerShell 공급자가 Remove-Item cmdlet의 호출을 지원하도록 System.Management.Automation.Provider.ContainerCmdletProvider.RemoveItem* 메서드를 재정의해야 합니다. 이 메서드는 지정된 경로의 데이터 저장소에서 항목을 삭제합니다. Remove-Item cmdlet의 recurse 매개 변수가 true설정되면 메서드는 해당 수준에 관계없이 모든 자식 항목을 제거합니다. 매개 변수가 false설정되면 메서드는 지정된 경로에서 단일 항목만 제거합니다.

이 공급자는 항목 제거를 지원하지 않습니다. 그러나 다음 코드는 System.Management.Automation.Provider.ContainerCmdletProvider.RemoveItem*기본 구현입니다.

RemoveItem 구현에 대해 기억해야 할 사항

다음 조건은 System.Management.Automation.Provider.ContainerCmdletProvider.NewItem*구현에 적용될 수 있습니다.

Remove-Item Cmdlet에 동적 매개 변수 연결

경우에 따라 Remove-Item cmdlet에는 런타임에 동적으로 지정된 추가 매개 변수가 필요합니다. 이러한 동적 매개 변수를 제공하려면 컨테이너 공급자가 이러한 매개 변수를 처리하려면 System.Management.Automation.Provider.ContainerCmdletProvider.RemoveItemDynamicParameters* 메서드를 구현해야 합니다. 이 메서드는 표시된 경로에서 항목에 대한 동적 매개 변수를 검색하고 cmdlet 클래스 또는 System.Management.Automation.RuntimeDefinedParameterDictionary 개체와 유사한 구문 분석 특성이 있는 속성과 필드가 있는 개체를 반환합니다. Windows PowerShell 런타임은 반환된 개체를 사용하여 매개 변수를 Remove-Item cmdlet에 추가합니다.

이 컨테이너 공급자는 이 메서드를 구현하지 않습니다. 그러나 다음 코드는 System.Management.Automation.Provider.ContainerCmdletProvider.RemoveItemDynamicParameters*기본 구현입니다.

자식 항목 쿼리

지정된 경로에 자식 항목이 있는지 확인하려면 Windows PowerShell 컨테이너 공급자가 System.Management.Automation.Provider.ContainerCmdletProvider.HasChildItems* 메서드를 재정의해야 합니다. 이 메서드는 항목에 자식이 있으면 true 반환하고, 그렇지 않으면 false. null 또는 빈 경로의 경우 메서드는 데이터 저장소의 모든 항목을 자식으로 간주하고 true반환합니다.

다음은 System.Management.Automation.Provider.ContainerCmdletProvider.HasChildItems* 메서드에 대한 재정의입니다. ChunkPath 도우미 메서드에서 만든 경로 부분이 두 개 이상 있는 경우 데이터베이스 컨테이너와 테이블 컨테이너만 정의되므로 메서드는 false반환합니다. 이 도우미 메서드에 대한 자세한 내용은 Windows PowerShell 항목 공급자만드는 데 설명된 ChunkPath 메서드를 참조하세요.

protected override bool HasChildItems( string path )
{
    return false;
} // HasChildItems
        ErrorCategory.InvalidOperation, tableName));
}

return results;

HasChildItems 구현에 대해 기억해야 할 사항

다음 조건은 System.Management.Automation.Provider.ContainerCmdletProvider.HasChildItems*구현에 적용될 수 있습니다.

항목 복사

항목을 복사하려면 컨테이너 공급자가 System.Management.Automation.Provider.ContainerCmdletProvider.CopyItem 메서드를 구현하여 Copy-Item cmdlet의 호출을 지원해야 합니다. 이 메서드는 cmdlet의 path 매개 변수로 표시된 위치에서 copyPath 매개 변수로 표시된 위치에 데이터 항목을 복사합니다. recurse 매개 변수를 지정하면 메서드는 모든 하위 컨테이너를 복사합니다. 매개 변수를 지정하지 않으면 메서드는 단일 수준의 항목만 복사합니다.

이 공급자는 이 메서드를 구현하지 않습니다. 그러나 다음 코드는 System.Management.Automation.Provider.ContainerCmdletProvider.CopyItem기본 구현입니다.

CopyItem 구현에 대해 기억해야 할 사항

다음 조건은 System.Management.Automation.Provider.ContainerCmdletProvider.CopyItem구현에 적용될 수 있습니다.

Copy-Item Cmdlet에 동적 매개 변수 연결

경우에 따라 Copy-Item cmdlet에는 런타임에 동적으로 지정된 추가 매개 변수가 필요합니다. 이러한 동적 매개 변수를 제공하려면 Windows PowerShell 컨테이너 공급자가 system.Management.Automation.Provider.ContainerCmdletProvider.CopyItemDynamicParameters* 메서드를 구현하여 이러한 매개 변수를 처리해야 합니다. 이 메서드는 표시된 경로에서 항목의 매개 변수를 검색하고 cmdlet 클래스 또는 System.Management.Automation.RuntimeDefinedParameterDictionary 개체와 유사한 구문 분석 특성이 있는 속성 및 필드가 있는 개체를 반환합니다. Windows PowerShell 런타임은 반환된 개체를 사용하여 매개 변수를 Copy-Item cmdlet에 추가합니다.

이 공급자는 이 메서드를 구현하지 않습니다. 그러나 다음 코드는 System.Management.Automation.Provider.ContainerCmdletProvider.CopyItemDynamicParameters*기본 구현입니다.

코드 샘플

전체 샘플 코드는 AccessDbProviderSample04 코드 샘플참조하세요.

Windows PowerShell 공급자 빌드

Cmdlet, 공급자 및 호스트 애플리케이션등록하는 방법을 참조하세요.

Windows PowerShell 공급자 테스트

Windows PowerShell 공급자가 Windows PowerShell에 등록된 경우 명령줄에서 지원되는 cmdlet을 실행하여 테스트할 수 있습니다. 다음 예제 출력은 가상의 Access 데이터베이스를 사용합니다.

  1. Get-ChildItem cmdlet을 실행하여 Access 데이터베이스의 Customers 테이블에서 자식 항목 목록을 검색합니다.

    Get-ChildItem mydb:customers
    

    다음 출력이 나타납니다.

    PSPath        : AccessDB::customers
    PSDrive       : mydb
    PSProvider    : System.Management.Automation.ProviderInfo
    PSIsContainer : True
    Data          : System.Data.DataRow
    Name          : Customers
    RowCount      : 91
    Columns       :
    
  2. Get-ChildItem cmdlet을 다시 실행하여 테이블의 데이터를 검색합니다.

    (Get-ChildItem mydb:customers).Data
    

    다음 출력이 나타납니다.

    TABLE_CAT   : C:\PS\northwind
    TABLE_SCHEM :
    TABLE_NAME  : Customers
    TABLE_TYPE  : TABLE
    REMARKS     :
    
  3. 이제 Get-Item cmdlet을 사용하여 데이터 테이블의 행 0에서 항목을 검색합니다.

    Get-Item mydb:\customers\0
    

    다음 출력이 나타납니다.

    PSPath        : AccessDB::customers\0
    PSDrive       : mydb
    PSProvider    : System.Management.Automation.ProviderInfo
    PSIsContainer : False
    Data          : System.Data.DataRow
    RowNumber     : 0
    
  4. Get-Item 다시 사용하여 행 0의 항목에 대한 데이터를 검색합니다.

    (Get-Item mydb:\customers\0).Data
    

    다음 출력이 나타납니다.

    CustomerID   : 1234
    CompanyName  : Fabrikam
    ContactName  : Eric Gruber
    ContactTitle : President
    Address      : 4567 Main Street
    City         : Buffalo
    Region       : NY
    PostalCode   : 98052
    Country      : USA
    Phone        : (425) 555-0100
    Fax          : (425) 555-0101
    
  5. 이제 New-Item cmdlet을 사용하여 기존 테이블에 행을 추가합니다. Path 매개 변수는 행의 전체 경로를 지정하며 테이블의 기존 행 수보다 큰 행 번호를 나타내야 합니다. Type 매개 변수는 추가할 항목의 유형을 지정할 Row 나타냅니다. 마지막으로 Value 매개 변수는 행에 대한 열 값의 쉼표로 구분된 목록을 지정합니다.

    New-Item -Path mydb:\Customers\3 -ItemType "Row" -Value "3,CustomerFirstName,CustomerLastName,CustomerEmailAddress,CustomerTitle,CustomerCompany,CustomerPhone, CustomerAddress,CustomerCity,CustomerState,CustomerZip,CustomerCountry"
    
  6. 다음과 같이 새 항목 작업의 정확성을 확인합니다.

    PS mydb:\> cd Customers
    PS mydb:\Customers> (Get-Item 3).Data
    

    다음 출력이 나타납니다.

    ID        : 3
    FirstName : Eric
    LastName  : Gruber
    Email     : ericgruber@fabrikam.com
    Title     : President
    Company   : Fabrikam
    WorkPhone : (425) 555-0100
    Address   : 4567 Main Street
    City      : Buffalo
    State     : NY
    Zip       : 98052
    Country   : USA
    

또한 참조하십시오

Windows PowerShell 공급자 만들기

Windows PowerShell 공급자 디자인하는

항목 Windows PowerShell 공급자 구현

탐색 Windows PowerShell 공급자 구현

Cmdlet, 공급자 및 호스트 애플리케이션 등록하는 방법

Windows PowerShell SDK

Windows PowerShell 프로그래머 가이드