Share via


Find-SCLibraryShare

Finds all of the shares on the specified computer or library server that can be added as library shares.

Syntax

New (Default)

Find-SCLibraryShare
    [-ComputerName] <String>
    -Credential <VMMCredential>
    [-VMMServer <ServerConnection>]
    [<CommonParameters>]

Existing

Find-SCLibraryShare
    -LibraryServer <LibraryServer>
    [-VMMServer <ServerConnection>]
    [<CommonParameters>]

Description

The Find-SCLibraryShare cmdlet finds all of the shares on the specified computer or library server that can be added as library shares. For library servers, this command also returns shares that are already Virtual Machine Manager (VMM) library shares.

Examples

Example 1: Find Windows shares on a computer that is not yet a VMM library server

PS C:\> $Credential = Get-Credential
PS C:\> Find-SCLibraryShare -Credential $Credential -ComputerName "Server01.Contoso.com"

The first command uses Get-Credential to prompt you to supply a user name and password with permissions to access Windows shares on Server01 and stores your credentials in the $Credential variable.

The second command confirms that you have valid credentials for this operation and then displays all existing Windows shares capable of becoming VMM library shares.

Example 2: Find shares on a VMM library server

PS C:\> Find-SCLibraryShare -LibraryServer "LibraryServer01.Contoso.com"

This command displays all Windows shares capable of becoming library shares that exist on LibraryServer01 as well as all shares that are already VMM library shares.

Parameters

-ComputerName

Specifies the name of a computer that VMM can uniquely identify on your network. The acceptable values for this parameter are:

  • FQDN
  • IPv4 or IPv6 address
  • NetBIOS name

Parameter properties

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

Parameter sets

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

-Credential

Specifies a credential object or, for some cmdlets, a Run As account object that contains the user name and password of an account that has permission to perform this action. Or, in the case of Restart-SCJob, has permission to complete a restarted task.

For more information about the PSCredential object, type Get-Help Get-Credential.

For more information about Run As accounts, type Get-Help New-SCRunAsAccount.

Parameter properties

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

Parameter sets

New
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LibraryServer

Specifies a VMM library server object.

Parameter properties

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

Parameter sets

Existing
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a VMM server object.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
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.

Outputs

DiscoveredShare

This cmdlet returns an array of DiscoveredShare objects.