

버전 5(V5) AWS Tools for PowerShell 가 릴리스되었습니다.

변경 사항 해제 및 애플리케이션 마이그레이션에 대한 자세한 내용은 [마이그레이션 주제를](https://docs.aws.amazon.com/powershell/v5/userguide/migrating-v5.html) 참조하세요.

 [https://docs.aws.amazon.com/powershell/v5/userguide/migrating-v5.html](https://docs.aws.amazon.com/powershell/v5/userguide/migrating-v5.html)

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# Directory Service Tools for PowerShell V5를 사용한 예제
<a name="powershell_directory-service_code_examples"></a>

다음 코드 예제에서는와 함께 AWS Tools for PowerShell V5를 사용하여 작업을 수행하고 일반적인 시나리오를 구현하는 방법을 보여줍니다 Directory Service.

*작업*은 대규모 프로그램에서 발췌한 코드이며 컨텍스트에 맞춰 실행해야 합니다. 작업은 개별 서비스 함수를 직접적으로 호출하는 방법을 보여주며 관련 시나리오의 컨텍스트에 맞는 작업을 볼 수 있습니다.

각 예시에는 전체 소스 코드에 대한 링크가 포함되어 있으며, 여기에서 컨텍스트에 맞춰 코드를 설정하고 실행하는 방법에 대한 지침을 찾을 수 있습니다.

**Topics**
+ [작업](#actions)

## 작업
<a name="actions"></a>

### `Add-DSIpRoute`
<a name="directory-service_AddIpRoutes_powershell_topic"></a>

다음 코드 예시는 `Add-DSIpRoute`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 명령에서는 지정된 Directory-id에 할당된 리소스 태그를 제거합니다.**  

```
Add-DSIpRoute -DirectoryId d-123456ijkl -IpRoute @{CidrIp ="203.0.113.5/32"} -UpdateSecurityGroupForDirectoryController $true
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [AddIpRoutes](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Add-DSResourceTag`
<a name="directory-service_AddTagsToResource_powershell_topic"></a>

다음 코드 예시는 `Add-DSResourceTag`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 명령에서는 지정된 Directory-id에 리소스 태그를 추가합니다.**  

```
Add-DSResourceTag -ResourceId d-123456ijkl -Tag @{Key="myTag"; Value="mytgValue"}
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [AddTagsToResource](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Approve-DSTrust`
<a name="directory-service_VerifyTrust_powershell_topic"></a>

다음 코드 예시는 `Approve-DSTrust`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1:이 예제에서는 지정된 Trustid에 대한 AWS Directory Service VerifyTrust API 작업을 호출합니다.**  

```
Approve-DSTrust -TrustId t-9067157123
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [VerifyTrust](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Confirm-DSSharedDirectory`
<a name="directory-service_AcceptSharedDirectory_powershell_topic"></a>

다음 코드 예시는 `Confirm-DSSharedDirectory`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1:이 예제에서는 디렉터리 소유자로부터 전송된 디렉터리 공유 요청을 수락합니다 AWS 계정.**  

```
Confirm-DSSharedDirectory -SharedDirectoryId d-9067012345
```
**출력:**  

```
CreatedDateTime     : 12/30/2019 4:20:27 AM
LastUpdatedDateTime : 12/30/2019 4:21:40 AM
OwnerAccountId      : 123456781234
OwnerDirectoryId    : d-123456ijkl
SharedAccountId     : 123456784321
SharedDirectoryId   : d-9067012345
ShareMethod         :
ShareNotes          : This is test sharing
ShareStatus         : Sharing
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [AcceptSharedDirectory](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Connect-DSDirectory`
<a name="directory-service_ConnectDirectory_powershell_topic"></a>

다음 코드 예시는 `Connect-DSDirectory`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 AD Connector를 생성하여 온프레미스 디렉터리에 연결합니다.**  

```
Connect-DSDirectory -Name contoso.com -ConnectSettings_CustomerUserName Administrator -Password $Password -ConnectSettings_CustomerDnsIp 172.31.36.96 -ShortName CONTOSO -Size Small -ConnectSettings_VpcId vpc-123459da -ConnectSettings_SubnetId subnet-1234ccaa, subnet-5678ffbb
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [ConnectDirectory](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Deny-DSSharedDirectory`
<a name="directory-service_RejectSharedDirectory_powershell_topic"></a>

다음 코드 예시는 `Deny-DSSharedDirectory`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 디렉터리 소유자 계정에서 보낸 디렉터리 공유 요청을 거부합니다. **   

```
Deny-DSSharedDirectory -SharedDirectoryId d-9067012345
```
**출력:**  

```
d-9067012345
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [RejectSharedDirectory](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Disable-DSDirectoryShare`
<a name="directory-service_UnshareDirectory_powershell_topic"></a>

다음 코드 예시는 `Disable-DSDirectoryShare`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 디렉터리 소유자와 소비자 간의 디렉터리 공유를 중지합니다.**  

```
Disable-DSDirectoryShare -DirectoryId d-123456ijkl -UnshareTarget_Id 123456784321 -UnshareTarget_Type ACCOUNT
```
**출력:**  

```
d-9067012345
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [UnshareDirectory](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Disable-DSLDAPS`
<a name="directory-service_DisableLDAPS_powershell_topic"></a>

다음 코드 예시는 `Disable-DSLDAPS`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 지정된 디렉터리에 대한 LDAP 보안 직접 호출을 비활성화합니다.**  

```
Disable-DSLDAPS -DirectoryId d-123456ijkl -Type Client
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DisableLDAPS](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Disable-DSRadius`
<a name="directory-service_DisableRadius_powershell_topic"></a>

다음 코드 예시는 `Disable-DSRadius`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 AD Connector 또는 Microsoft AD 디렉터리에 대해 구성된 RADIUS 서버를 비활성화합니다.**  

```
Disable-DSRadius -DirectoryId d-123456ijkl
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DisableRadius](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Disable-DSSso`
<a name="directory-service_DisableSso_powershell_topic"></a>

다음 코드 예시는 `Disable-DSSso`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 디렉터리에 대한 Single Sign-On을 비활성화합니다.**  

```
Disable-DSSso -DirectoryId d-123456ijkl
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DisableSso](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Enable-DSDirectoryShare`
<a name="directory-service_ShareDirectory_powershell_topic"></a>

다음 코드 예시는 `Enable-DSDirectoryShare`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1:이 예제는 핸드셰이크 메서드를 사용하여 AWS 계정의 지정된 디렉터리를 다른 AWS 계정과 공유합니다. **   

```
Enable-DSDirectoryShare -DirectoryId d-123456ijkl -ShareTarget_Id 123456784321 -ShareMethod HANDSHAKE -ShareTarget_Type ACCOUNT
```
**출력:**  

```
d-9067012345
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [ShareDirectory](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Enable-DSLDAPS`
<a name="directory-service_EnableLDAPS_powershell_topic"></a>

다음 코드 예시는 `Enable-DSLDAPS`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 특정 디렉터리의 스위치를 활성화하여 LDAP 보안 직접 호출을 항상 사용합니다.**  

```
Enable-DSLDAPS -DirectoryId d-123456ijkl -Type Client
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [EnableLDAPS](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Enable-DSRadius`
<a name="directory-service_EnableRadius_powershell_topic"></a>

다음 코드 예시는 `Enable-DSRadius`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 AD Connector 또는 Microsoft AD 디렉터리에 대해 제공된 RADIUS 서버 구성을 사용하여 다중 인증(MFA)을 활성화합니다.**  

```
Enable-DSRadius -DirectoryId d-123456ijkl 
-RadiusSettings_AuthenticationProtocol PAP 
-RadiusSettings_DisplayLabel Radius 
-RadiusSettings_RadiusPort 1812 
-RadiusSettings_RadiusRetry 4 
-RadiusSettings_RadiusServer 10.4.185.113 
-RadiusSettings_RadiusTimeout 50 
-RadiusSettings_SharedSecret wJalrXUtnFEMI
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [EnableRadius](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Enable-DSSso`
<a name="directory-service_EnableSso_powershell_topic"></a>

다음 코드 예시는 `Enable-DSSso`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 디렉터리에 대한 Single Sign-On을 활성화합니다. **   

```
Enable-DSSso -DirectoryId d-123456ijkl
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [EnableSso](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Get-DSCertificate`
<a name="directory-service_DescribeCertificate_powershell_topic"></a>

다음 코드 예시는 `Get-DSCertificate`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 보안 LDAP 연결을 위해 등록된 인증서에 대한 정보를 표시합니다.**  

```
Get-DSCertificate -DirectoryId d-123456ijkl -CertificateId c-906731e34f
```
**출력:**  

```
CertificateId      : c-906731e34f
CommonName         : contoso-EC2AMAZ-CTGG2NM-CA
ExpiryDateTime     : 4/15/2025 6:34:15 PM
RegisteredDateTime : 4/15/2020 6:38:56 PM
State              : Registered
StateReason        : Certificate registered successfully.
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DescribeCertificate](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Get-DSCertificateList`
<a name="directory-service_ListCertificates_powershell_topic"></a>

다음 코드 예시는 `Get-DSCertificateList`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 지정된 디렉터리에 대한 보안 LDAP 연결을 위해 등록된 모든 인증서를 나열합니다.**  

```
Get-DSCertificateList -DirectoryId d-123456ijkl
```
**출력:**  

```
CertificateId CommonName                 ExpiryDateTime       State
------------- ----------                 --------------       -----
c-906731e34f  contoso-EC2AMAZ-CTGG2NM-CA 4/15/2025 6:34:15 PM Registered
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [ListCertificates](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Get-DSConditionalForwarder`
<a name="directory-service_DescribeConditionalForwarders_powershell_topic"></a>

다음 코드 예시는 `Get-DSConditionalForwarder`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 명령에서는 지정된 Directory-id에 대해 구성된 모든 조건부 전달자를 가져옵니다. **   

```
Get-DSConditionalForwarder -DirectoryId d-123456ijkl
```
**출력:**  

```
DnsIpAddrs      RemoteDomainName ReplicationScope
----------      ---------------- ----------------
{172.31.77.239} contoso.com      Domain
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DescribeConditionalForwarders](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Get-DSDirectory`
<a name="directory-service_DescribeDirectories_powershell_topic"></a>

다음 코드 예시는 `Get-DSDirectory`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 명령에서는 이 계정에 속한 디렉터리의 정보를 가져옵니다.**  

```
Get-DSDirectory | Select-Object DirectoryId, Name, DnsIpAddrs, Type
```
**출력:**  

```
DirectoryId  Name           DnsIpAddrs                     Type
-----------  ----           ----------                     ----
d-123456abcd abcd.example.com {172.31.74.189, 172.31.13.145} SimpleAD
d-123456efgh wifi.example.com {172.31.16.108, 172.31.10.56}  ADConnector
d-123456ijkl lan2.example.com {172.31.10.56, 172.31.16.108}  MicrosoftAD
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DescribeDirectories](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Get-DSDirectoryLimit`
<a name="directory-service_GetDirectoryLimits_powershell_topic"></a>

다음 코드 예시는 `Get-DSDirectoryLimit`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 us-east-1 리전에 대한 디렉터리 제한 정보를 표시합니다. **   

```
Get-DSDirectoryLimit -Region us-east-1
```
**출력:**  

```
CloudOnlyDirectoriesCurrentCount : 1
CloudOnlyDirectoriesLimit        : 10
CloudOnlyDirectoriesLimitReached : False
CloudOnlyMicrosoftADCurrentCount : 1
CloudOnlyMicrosoftADLimit        : 20
CloudOnlyMicrosoftADLimitReached : False
ConnectedDirectoriesCurrentCount : 1
ConnectedDirectoriesLimit        : 10
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [GetDirectoryLimits](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

### `Get-DSDomainControllerList`
<a name="directory-service_DescribeDomainControllers_powershell_topic"></a>

다음 코드 예시는 `Get-DSDomainControllerList`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 명령에서는 언급된 directory-id에 대해 시작된 도메인 컨트롤러의 세부 목록을 가져옵니다.**  

```
Get-DSDomainControllerList -DirectoryId d-123456ijkl
```
**출력:**  

```
AvailabilityZone          : us-east-1b
DirectoryId               : d-123456ijkl
DnsIpAddr                 : 172.31.16.108
DomainControllerId        : dc-1234567aa6
LaunchTime                : 4/4/2019 4:53:43 AM
Status                    : Active
StatusLastUpdatedDateTime : 4/24/2019 1:37:54 PM
StatusReason              :
SubnetId                  : subnet-1234kkaa
VpcId                     : vpc-123459d

AvailabilityZone          : us-east-1d
DirectoryId               : d-123456ijkl
DnsIpAddr                 : 172.31.10.56
DomainControllerId        : dc-1234567aa7
LaunchTime                : 4/4/2019 4:53:43 AM
Status                    : Active
StatusLastUpdatedDateTime : 4/4/2019 5:14:31 AM
StatusReason              :
SubnetId                  : subnet-5678ffbb
VpcId                     : vpc-123459d
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DescribeDomainControllers](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Get-DSEventTopic`
<a name="directory-service_DescribeEventTopics_powershell_topic"></a>

다음 코드 예시는 `Get-DSEventTopic`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 명령에서는 디렉터리 상태가 변경될 때 알림을 보내도록 구성된 SNS 주제의 정보를 보여줍니다.**  

```
Get-DSEventTopic -DirectoryId d-123456ijkl
```
**출력:**  

```
CreatedDateTime : 12/13/2019 11:15:32 AM
DirectoryId     : d-123456ijkl
Status          : Registered
TopicArn        : arn:aws:sns:us-east-1:123456781234:snstopicname
TopicName       : snstopicname
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DescribeEventTopics](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

### `Get-DSIpRouteList`
<a name="directory-service_ListIpRoutes_powershell_topic"></a>

다음 코드 예시는 `Get-DSIpRouteList`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 명령에서는 디렉터리 IP 라우팅에 구성된 퍼블릭 IP 주소 블록을 가져옵니다.**  

```
Get-DSIpRouteList -DirectoryId d-123456ijkl
```
**출력:**  

```
AddedDateTime       : 12/13/2019 12:27:22 PM
CidrIp              : 203.0.113.5/32
Description         : Public IP of On-Prem DNS Server
DirectoryId         : d-123456ijkl
IpRouteStatusMsg    : Added
IpRouteStatusReason :
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [ListIpRoutes](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Get-DSLDAPSSetting`
<a name="directory-service_DescribeLDAPSSettings_powershell_topic"></a>

다음 코드 예시는 `Get-DSLDAPSSetting`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 지정된 디렉터리에 대한 LDAP 보안 상태를 설명합니다.**  

```
Get-DSLDAPSSetting -DirectoryId d-123456ijkl
```
**출력:**  

```
LastUpdatedDateTime  LDAPSStatus LDAPSStatusReason
-------------------  ----------- -----------------
4/15/2020 6:51:03 PM Enabled     LDAPS is enabled successfully.
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DescribeLDAPSSettings](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

### `Get-DSLogSubscriptionList`
<a name="directory-service_ListLogSubscriptions_powershell_topic"></a>

다음 코드 예시는 `Get-DSLogSubscriptionList`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 명령에서는 지정된 directory-id의 로그 구독 정보를 가져옵니다. **   

```
Get-DSLogSubscriptionList -DirectoryId d-123456ijkl
```
**출력:**  

```
DirectoryId  LogGroupName                                        SubscriptionCreatedDateTime
-----------  ------------                                        ---------------------------
d-123456ijkl /aws/directoryservice/d-123456ijkl-lan2.example.com 12/14/2019 9:05:23 AM
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [ListLogSubscriptions](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

### `Get-DSResourceTag`
<a name="directory-service_ListTagsForResource_powershell_topic"></a>

다음 코드 예시는 `Get-DSResourceTag`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 명령에서는 지정된 디렉터리의 모든 태그를 가져옵니다.**  

```
Get-DSResourceTag -ResourceId d-123456ijkl
```
**출력:**  

```
Key   Value
---   -----
myTag myTagValue
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [ListTagsForResource](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Get-DSSchemaExtension`
<a name="directory-service_ListSchemaExtensions_powershell_topic"></a>

다음 코드 예시는 `Get-DSSchemaExtension`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 Microsoft AD 디렉터리에 적용된 모든 스키마 확장을 나열합니다.**  

```
Get-DSSchemaExtension -DirectoryId d-123456ijkl
```
**출력:**  

```
Description                 : ManagedADSchemaExtension
DirectoryId                 : d-123456ijkl
EndDateTime                 : 4/12/2020 10:30:49 AM
SchemaExtensionId           : e-9067306643
SchemaExtensionStatus       : Completed
SchemaExtensionStatusReason : Schema updates are complete.
StartDateTime               : 4/12/2020 10:28:42 AM
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [ListSchemaExtensions](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

### `Get-DSSharedDirectory`
<a name="directory-service_DescribeSharedDirectories_powershell_topic"></a>

다음 코드 예시는 `Get-DSSharedDirectory`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1:이 예제는 AWS 계정의 공유 디렉터리를 가져옵니다.**  

```
Get-DSSharedDirectory -OwnerDirectoryId d-123456ijkl -SharedDirectoryId d-9067012345
```
**출력:**  

```
CreatedDateTime     : 12/30/2019 4:34:37 AM
LastUpdatedDateTime : 12/30/2019 4:35:22 AM
OwnerAccountId      : 123456781234
OwnerDirectoryId    : d-123456ijkl
SharedAccountId     : 123456784321
SharedDirectoryId   : d-9067012345
ShareMethod         : HANDSHAKE
ShareNotes          : This is a test Sharing
ShareStatus         : Shared
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DescribeSharedDirectories](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Get-DSSnapshot`
<a name="directory-service_DescribeSnapshots_powershell_topic"></a>

다음 코드 예시는 `Get-DSSnapshot`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 명령에서는 이 계정에 속한 지정된 디렉터리 스냅샷의 정보를 가져옵니다.**  

```
Get-DSSnapshot -DirectoryId d-123456ijkl
```
**출력:**  

```
DirectoryId : d-123456ijkl
Name        :
SnapshotId  : s-9064bd1234
StartTime   : 12/13/2019 6:33:01 PM
Status      : Completed
Type        : Auto

DirectoryId : d-123456ijkl
Name        :
SnapshotId  : s-9064bb4321
StartTime   : 12/9/2019 9:48:11 PM
Status      : Completed
Type        : Auto
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DescribeSnapshots](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

### `Get-DSSnapshotLimit`
<a name="directory-service_GetSnapshotLimits_powershell_topic"></a>

다음 코드 예시는 `Get-DSSnapshotLimit`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 명령에서는 지정된 디렉터리에 대한 수동 스냅샷 제한을 가져옵니다.**  

```
Get-DSSnapshotLimit -DirectoryId d-123456ijkl
```
**출력:**  

```
ManualSnapshotsCurrentCount ManualSnapshotsLimit ManualSnapshotsLimitReached
--------------------------- -------------------- ---------------------------
0                           5                    False
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [GetSnapshotLimits](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

### `Get-DSTrust`
<a name="directory-service_DescribeTrusts_powershell_topic"></a>

다음 코드 예시는 `Get-DSTrust`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 명령에서는 지정된 directory-id에 대해 생성된 신뢰 관계 정보를 가져옵니다.**  

```
Get-DSTrust -DirectoryId d-123456abcd
```
**출력:**  

```
CreatedDateTime          : 7/5/2019 4:55:42 AM
DirectoryId              : d-123456abcd
LastUpdatedDateTime      : 7/5/2019 4:56:04 AM
RemoteDomainName         : contoso.com
SelectiveAuth            : Disabled
StateLastUpdatedDateTime : 7/5/2019 4:56:04 AM
TrustDirection           : One-Way: Incoming
TrustId                  : t-9067157123
TrustState               : Created
TrustStateReason         :
TrustType                : Forest
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DescribeTrusts](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `New-DSAlias`
<a name="directory-service_CreateAlias_powershell_topic"></a>

다음 코드 예시는 `New-DSAlias`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 디렉터리에 대한 별칭을 생성하고 별칭을 지정된 directory-id에 할당합니다.**  

```
New-DSAlias -DirectoryId d-123456ijkl -Alias MyOrgName
```
**출력:**  

```
Alias     DirectoryId
-----     -----------
myorgname d-123456ijkl
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [CreateAlias](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `New-DSComputer`
<a name="directory-service_CreateComputer_powershell_topic"></a>

다음 코드 예시는 `New-DSComputer`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 새 Active Directory 컴퓨터 객체를 생성합니다.**  

```
New-DSComputer -DirectoryId d-123456ijkl -ComputerName ADMemberServer -Password $Password
```
**출력:**  

```
ComputerAttributes                  ComputerId                                    ComputerName
------------------                  ----------                                    ------------
{WindowsSamName, DistinguishedName} S-1-5-21-1191241402-978882507-2717148213-1662 ADMemberServer
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [CreateComputer](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `New-DSConditionalForwarder`
<a name="directory-service_CreateConditionalForwarder_powershell_topic"></a>

다음 코드 예시는 `New-DSConditionalForwarder`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1:이 예제에서는 지정된 AWS Directory-id에 조건부 전달자를 생성합니다. **   

```
New-DSConditionalForwarder -DirectoryId d-123456ijkl -DnsIpAddr 172.31.36.96,172.31.10.56 -RemoteDomainName contoso.com
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [CreateConditionalForwarder](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `New-DSDirectory`
<a name="directory-service_CreateDirectory_powershell_topic"></a>

다음 코드 예시는 `New-DSDirectory`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 새 Simple AD 디렉터리를 생성합니다.**  

```
New-DSDirectory -Name corp.example.com -Password $Password -Size Small -VpcSettings_VpcId vpc-123459d -VpcSettings_SubnetIds subnet-1234kkaa,subnet-5678ffbb
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [CreateDirectory](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `New-DSLogSubscription`
<a name="directory-service_CreateLogSubscription_powershell_topic"></a>

다음 코드 예시는 `New-DSLogSubscription`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 실시간 Directory Service 도메인 컨트롤러 보안 로그를 AWS 계정에 지정된 Amazon CloudWatch 로그 그룹으로 전달하기 위한 구독을 생성합니다.**  

```
New-DSLogSubscription -DirectoryId d-123456ijkl -LogGroupName /aws/directoryservice/d-123456ijkl-lan2.example.com
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [CreateLogSubscription](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

### `New-DSMicrosoftAD`
<a name="directory-service_CreateMicrosoftAD_powershell_topic"></a>

다음 코드 예시는 `New-DSMicrosoftAD`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1:이 예제에서는에 새 Microsoft AD 디렉터리를 생성합니다 AWS 클라우드.**  

```
New-DSMicrosoftAD -Name corp.example.com -Password $Password -edition Standard -VpcSettings_VpcId vpc-123459d -VpcSettings_SubnetIds subnet-1234kkaa,subnet-5678ffbb
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [CreateMicrosoftAD](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `New-DSSnapshot`
<a name="directory-service_CreateSnapshot_powershell_topic"></a>

다음 코드 예시는 `New-DSSnapshot`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 디렉터리 스냅샷을 생성합니다.**  

```
New-DSSnapshot -DirectoryId d-123456ijkl
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [CreateSnapshot](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

### `New-DSTrust`
<a name="directory-service_CreateTrust_powershell_topic"></a>

다음 코드 예시는 `New-DSTrust`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1:이 예제에서는 AWS 관리형 Microsoft AD 디렉터리와 기존 온프레미스 Microsoft Active Directory 간에 양방향 포리스트 전체 신뢰를 생성합니다.**  

```
New-DSTrust -DirectoryId d-123456ijkl -RemoteDomainName contoso.com -TrustDirection Two-Way -TrustType Forest -TrustPassword $Password -ConditionalForwarderIpAddr 172.31.36.96
```
**출력:**  

```
t-9067157123
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [CreateTrust](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Register-DSCertificate`
<a name="directory-service_RegisterCertificate_powershell_topic"></a>

다음 코드 예시는 `Register-DSCertificate`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 보안 LDAP 연결에 대해 인증서를 등록합니다.**  

```
$Certificate = Get-Content contoso.cer -Raw
Register-DSCertificate -DirectoryId d-123456ijkl -CertificateData $Certificate
```
**출력:**  

```
c-906731e350
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [RegisterCertificate](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Register-DSEventTopic`
<a name="directory-service_RegisterEventTopic_powershell_topic"></a>

다음 코드 예시는 `Register-DSEventTopic`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 디렉터리를 게시자로 하여 SNS 주제에 연결합니다.**  

```
Register-DSEventTopic -DirectoryId d-123456ijkl -TopicName snstopicname
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [RegisterEventTopic](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

### `Remove-DSConditionalForwarder`
<a name="directory-service_DeleteConditionalForwarder_powershell_topic"></a>

다음 코드 예시는 `Remove-DSConditionalForwarder`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1:이 예제에서는 AWS Direcotry에 대해 설정된 조건부 전달자를 제거합니다.**  

```
Remove-DSConditionalForwarder -DirectoryId d-123456ijkl -RemoteDomainName contoso.com
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DeleteConditionalForwarder](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Remove-DSDirectory`
<a name="directory-service_DeleteDirectory_powershell_topic"></a>

다음 코드 예시는 `Remove-DSDirectory`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1:이 예제에서는 AWS 디렉터리 서비스 디렉터리(Simple AD/Microsoft AD/AD Connector)를 삭제합니다.**  

```
Remove-DSDirectory -DirectoryId d-123456ijkl
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DeleteDirectory](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Remove-DSIpRoute`
<a name="directory-service_RemoveIpRoutes_powershell_topic"></a>

다음 코드 예시는 `Remove-DSIpRoute`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 명령에서는 Directory-id에 대해 구성된 IP 경로에서 지정된 IP를 제거합니다. **   

```
Remove-DSIpRoute -DirectoryId d-123456ijkl -CidrIp 203.0.113.5/32
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [RemoveIpRoutes](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Remove-DSLogSubscription`
<a name="directory-service_DeleteLogSubscription_powershell_topic"></a>

다음 코드 예시는 `Remove-DSLogSubscription`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 명령에서는 지정된 Directory-id의 로그 구독을 제거합니다.**  

```
Remove-DSLogSubscription -DirectoryId d-123456ijkl
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DeleteLogSubscription](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

### `Remove-DSResourceTag`
<a name="directory-service_RemoveTagsFromResource_powershell_topic"></a>

다음 코드 예시는 `Remove-DSResourceTag`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 명령에서는 지정된 Directory-id에 할당된 리소스 태그를 제거합니다.**  

```
Remove-DSResourceTag -ResourceId d-123456ijkl -TagKey myTag
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [RemoveTagsFromResource](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Remove-DSSnapshot`
<a name="directory-service_DeleteSnapshot_powershell_topic"></a>

다음 코드 예시는 `Remove-DSSnapshot`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 수동으로 생성된 스냅샷을 제거합니다.**  

```
Remove-DSSnapshot -SnapshotId s-9068b488kc
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DeleteSnapshot](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

### `Remove-DSTrust`
<a name="directory-service_DeleteTrust_powershell_topic"></a>

다음 코드 예시는 `Remove-DSTrust`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1:이 예제에서는 AWS Managed AD Directory와 외부 도메인 간에 존재하는 신뢰 관계 힙을 제거합니다.**  

```
Get-DSTrust -DirectoryId d-123456ijkl -Select Trusts.TrustId | Remove-DSTrust
```
**출력:**  

```
t-9067157123
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DeleteTrust](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Reset-DSUserPassword`
<a name="directory-service_ResetUserPassword_powershell_topic"></a>

다음 코드 예시는 `Reset-DSUserPassword`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1:이 예제에서는 AWS Managed microsoft AD 또는 Simple AD Directory에서 ADUser라는 Active Direcotry 사용자의 암호를 재설정합니다.**  

```
Reset-DSUserPassword -UserName ADuser -DirectoryId d-123456ijkl -NewPassword $Password
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [ResetUserPassword](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Restore-DSFromSnapshot`
<a name="directory-service_RestoreFromSnapshot_powershell_topic"></a>

다음 코드 예시는 `Restore-DSFromSnapshot`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 기존 디렉터리 스냅샷을 사용하여 디렉터리를 복원합니다.**  

```
Restore-DSFromSnapshot -SnapshotId s-9068b488kc
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [RestoreFromSnapshot](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

### `Set-DSDomainControllerCount`
<a name="directory-service_UpdateNumberOfDomainControllers_powershell_topic"></a>

다음 코드 예시는 `Set-DSDomainControllerCount`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 지정된 directory-id에 대해 도메인 컨트롤러 수를 3으로 설정합니다.**  

```
Set-DSDomainControllerCount -DirectoryId d-123456ijkl -DesiredNumber 3
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [UpdateNumberOfDomainControllers](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Start-DSSchemaExtension`
<a name="directory-service_StartSchemaExtension_powershell_topic"></a>

다음 코드 예시는 `Start-DSSchemaExtension`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 Microsoft AD 디렉터리에 스키마 확장을 적용합니다.**  

```
$ldif = Get-Content D:\Users\Username\Downloads\ExtendedSchema.ldf -Raw
Start-DSSchemaExtension -DirectoryId d-123456ijkl -CreateSnapshotBeforeSchemaExtension $true -Description ManagedADSchemaExtension -LdifContent $ldif
```
**출력:**  

```
e-9067306643
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [StartSchemaExtension](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

### `Stop-DSSchemaExtension`
<a name="directory-service_CancelSchemaExtension_powershell_topic"></a>

다음 코드 예시는 `Stop-DSSchemaExtension`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 Microsoft AD 디렉터리에 대해 진행 중인 스키마 확장을 취소합니다.**  

```
Stop-DSSchemaExtension -DirectoryId d-123456ijkl -SchemaExtensionId e-9067306643
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [CancelSchemaExtension](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

### `Unregister-DSCertificate`
<a name="directory-service_DeregisterCertificate_powershell_topic"></a>

다음 코드 예시는 `Unregister-DSCertificate`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 보안 LDAP 연결을 위해 등록된 인증서를 시스템에서 삭제합니다.**  

```
Unregister-DSCertificate -DirectoryId d-123456ijkl -CertificateId c-906731e34f
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DeregisterCertificate](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Unregister-DSEventTopic`
<a name="directory-service_DeregisterEventTopic_powershell_topic"></a>

다음 코드 예시는 `Unregister-DSEventTopic`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 지정된 디렉터리를 지정된 SNS 주제의 게시자에서 제거합니다.**  

```
Unregister-DSEventTopic -DirectoryId d-123456ijkl -TopicName snstopicname
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [DeregisterEventTopic](https://docs.aws.amazon.com/powershell/v5/reference)을 참조하세요.

### `Update-DSConditionalForwarder`
<a name="directory-service_UpdateConditionalForwarder_powershell_topic"></a>

다음 코드 예시는 `Update-DSConditionalForwarder`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1:이 예제에서는 AWS 디렉터리에 대해 설정된 조건부 전달자를 업데이트합니다.**  

```
Update-DSConditionalForwarder -DirectoryId d-123456ijkl -DnsIpAddr 172.31.36.96,172.31.16.108 -RemoteDomainName contoso.com
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [UpdateConditionalForwarder](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Update-DSRadius`
<a name="directory-service_UpdateRadius_powershell_topic"></a>

다음 코드 예시는 `Update-DSRadius`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 AD Connector 또는 Microsoft AD 디렉터리에 대한 RADIUS 서버 정보를 업데이트합니다.**  

```
Update-DSRadius -DirectoryId d-123456ijkl -RadiusSettings_RadiusRetry 3
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [UpdateRadius](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.

### `Update-DSTrust`
<a name="directory-service_UpdateTrust_powershell_topic"></a>

다음 코드 예시는 `Update-DSTrust`의 사용 방법을 보여줍니다.

**Tools for PowerShell V5**  
**예제 1: 이 예제에서는 지정된 trust-id의 SelectiveAuth 파라미터를 Disabled에서 Enabled로 업데이트합니다.**  

```
Update-DSTrust -TrustId t-9067157123 -SelectiveAuth Enabled
```
**출력:**  

```
RequestId                            TrustId
---------                            -------
138864a7-c9a8-4ad1-a828-eae479e85b45 t-9067157123
```
+  API 세부 정보는 *AWS Tools for PowerShell Cmdlet 참조(V5)*의 [UpdateTrust](https://docs.aws.amazon.com/powershell/v5/reference)를 참조하세요.