26.2 Get-DRAShare

Synopsis

Lists the properties of a computer’s share object(s).

Syntax

Get-DRAShare -Domain <String> -Identity <String> [-Name <String>] [-ContainerDN <String>] [-EnforceServerLimit <SwitchParameter>] [-IncludeChildContainers <SwitchParameter>] [-ObjectsPerResponse <Int32>] [-ResumeString <String>] [-Attributes <String[]>] [-DRARestServer <String>] [-DRARestPort <Int32>] [-IgnoreCertificateErrors <SwitchParameter>] [-Force <SwitchParameter>] [-Timeout <Int32>] [<CommonParameters>]

Description

Specify the target computer using the distinguishedName. The Get-DRAShare cmdlet returns a list of the share objects. When -Name is specified, returns a list of the share's properties.

Parameters

Attribute / Description

Parameters / Values

Required

Position

Default Value

Accept Pipeline input?

Accept wildcard characters?

Domain <String>

The domain of the object in FQDN format. For example: mydomain.corp

true

named

 

false

false

Identity [<String>]

The distinguished name of an existing computer object. For example: CN=COMPUTER123,CN=Computers,DC=DRDOM123,DC=com

false

named

 

true (ByPropertyName)

false

Name [<String>]

The Name parameter specifies the name of a computer resource. For example, "MyShare" for a file share, "MCSAdminSvc" for a service or, "Application" for an event log.

false

named

 

true (ByPropertyName)

false

ContainerDN [<String>]

The full path to the container to search in distinguished name format. For example: -ContainerDN "OU=Accounting,DC=MyDomain,DC=corp"

false

named

 

false

false

EnforceServerLimit [<SwitchParameter>]

A switch parameter to indicate that the search results should be limited by the search result limit on the DRA Server. The typical server limit is 1000 items. The default is true.

false

named

false

false

IncludeChildContainers [<SwitchParameter>]

A switch parameter to request that the search include child containers. The default is false: only the container named in the ContainerDN parameter is searched.

false

named

 

false

false

ObjectsPerResponse [<Nullable`1>]

The number of objects to return in a response. The default is 250.

false

named

 

false

false

ResumeString [<String>]

When multiple responses are needed to return all of the search results to the client, this parameter indicates the last item returned from the server. The value of this parameter would be set using the ResumeString property from the previous set of results. The ResumeString may look like this: "CN=MYUser160,CN=Users,DC=MyDomain,DC=corp"

The EnforceServerLimit, ObjectsPerResponse, and ResumeString parameters are applicable only when the Identifier parameter is not specified.

false

named

 

false

false

Attributes [<String[]>]

An array of attributes to retrieve specific values. If this parameter is missing, a default list of properties is returned.

false

named

 

true (ByPropertyName)

false

DRARestServer [<String>]

The name of the computer running the DRA REST Service. The requested DRA operation will be sent to the REST Service running on the specified computer. If this parameter is not specified, then the cmdlet will attempt to discover a DRA REST Service to use.

false

named

true (ByPropertyName)

false

DRARestPort [<Int32>]

The port number of the DRA REST Service. This parameter is only used when the DRARestServer parameter is also specified. If the DRARestServer parameter is specified but the DRARestPort is not, 8755 will be used as the default REST port.

false

named

8755

true (ByPropertyName)

false

IgnoreCertificateErrors [<SwitchParameter>]

Allows the request to bypass any SSL certificate errors, such as the InvalidOperation error that occurs when the REST Service is bound to a self-signed certificate.

false

named

false

false

Force [<SwitchParameter>]

Suppresses any request for user input and supplies a 'yes' response. For example: -Force with a delete request will perform the delete without presenting the confirmation request to the user.

false

named

false

false

Timeout [<Int32>]

The number of seconds to wait before the request to the DRA REST server times out. To specify an infinite timeout, you can set this parameter to -1.

false

named

100 seconds

true (ByPropertyName)

false

<CommonParameters>

Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters.

 

 

 

 

 

NOTE:For more information, type "Get-Help Get-DRAShare -detailed". For technical information, type "Get-Help Get-DRAShare -full".

Example 26-2 1

PS C:\>Get-DRAShare -Domain MyDomain.corp -Identity "CN=COMPUTER123,CN=Computers,DC=MyDomain,DC=corp"

This command example returns a list of share objects that belong to the computer named COMPUTER123 in MyDomain.corp.

Example 26-3 2

PS C:\>Get-DRAShare -Domain MyDomain.corp -Identity "CN=COMPUTER123,CN=Computers,DC=MyDomain,DC=corp" -Name "MyShare"

This command example returns a list of MyShare properties on the computer COMPUTER123 in MyDomain.corp.