Udostępnij za pośrednictwem


Set-SCLibraryServer

Sets the properties of a VMM library server.

Syntax

Default (Default)

Set-SCLibraryServer
    [-LibraryServer] <LibraryServer>
    [-LibraryServerManagementCredential <RunAsAccount>]
    [-Description <String>]
    [-VMHostGroup <HostGroup>]
    [-ClearVMHostGroup]
    [-JobGroup <Guid>]
    [-EnableUnencryptedFileTransfer <Boolean>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

VMNetwork

Set-SCLibraryServer
    [-LibraryServer] <LibraryServer>
    -VMNetworks <VMNetwork[]>
    [-LibraryServerManagementCredential <RunAsAccount>]
    [-Description <String>]
    [-VMHostGroup <HostGroup>]
    [-ClearVMHostGroup]
    [-JobGroup <Guid>]
    [-EnableUnencryptedFileTransfer <Boolean>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

AddVMNetwork

Set-SCLibraryServer
    [-LibraryServer] <LibraryServer>
    -AddVMNetwork <VMNetwork[]>
    [-LibraryServerManagementCredential <RunAsAccount>]
    [-Description <String>]
    [-VMHostGroup <HostGroup>]
    [-ClearVMHostGroup]
    [-JobGroup <Guid>]
    [-EnableUnencryptedFileTransfer <Boolean>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

RemoveVMNetwork

Set-SCLibraryServer
    [-LibraryServer] <LibraryServer>
    -RemoveVMNetwork <VMNetwork[]>
    [-LibraryServerManagementCredential <RunAsAccount>]
    [-Description <String>]
    [-VMHostGroup <HostGroup>]
    [-ClearVMHostGroup]
    [-JobGroup <Guid>]
    [-EnableUnencryptedFileTransfer <Boolean>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [<CommonParameters>]

Description

The Set-SCLibraryServer cmdlet sets the properties of a Virtual Machine Manager (VMM) library server. You can also use this cmdlet as part of a job group, when used with the Add-SCLibraryShare cmdlet, to add a set of library shares.

Examples

Example 1: Change the description of a library server

PS C:\> $LibServer = Get-SCLibraryServer -VMMServer "VMMServer01.Contoso.com" -ComputerName "LibraryServer01.Contoso.com"
PS C:\> Set-SCLibraryServer -LibraryServer $LibServer -Description "Library server for Production"

The first command gets the library server object named LibraryServer01 on VMMServer01 and stores it in the $LibServer variable.

The second command changes the description for FileServer01 to "Library server for Production."

Example 2: Update the description for a library server

PS C:\> $LibServer = Get-SCLibraryServer -VMMServer "VMMServer01.Contoso.com" -ComputerName "LibraryServer01.Contoso.com"
PS C:\> Set-SCLibraryServer -LibraryServer $LibServer -Description "The library server is used by the Seattle office."

The first command gets the library server object named LibraryServer01 on VMMServer01 and stores it in the $LibServer variable.

The second command updates the description for the library server object stored in the $LibServer variable.

Example 3: Add a VM network to a library server

PS C:\> $VMNetwork = Get-SCVMNetwork -Name "VMNetwork01"
PS C:\> Get-SCLibraryServer -ComputerName "LibraryServer01.Contoso.com" | Set-SCLibraryServer -AddVMNetwork $VMNetwork

The first command gets the VM network object named VMNetwork01 and stores the object in the $VMNetwork variable.

The second command gets the library server object named LibraryServer01 and uses the pipeline operator to pass the object to the Set-SCLibraryServer cmdlet, which adds VMNetwork01 to the library server.

Parameters

-AddVMNetwork

Specifies that one or more VM networks has network connectivity to the specified library server when used in conjunction with Set-SCLibraryServer.

Parameter properties

Type:

VMNetwork[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-ClearVMHostGroup

Resets the host group association for the library server.

Parameter properties

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

Parameter sets

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

-Description

Specifies a description for the library server.

Parameter properties

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

Parameter sets

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

-EnableUnencryptedFileTransfer

Indicates, when set to True, that network file transfers do not require encryption. Allowing unencrypted network file transfers can improve performance if neither the source host nor the destination host requires encryption.

Use this parameter to:

  • Enable unencrypted file transfers into, or out of, the library.
  • Enable unencrypted file transfers into, out of, or within a host group.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AllowUnencryptedTransfers

Parameter sets

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

-JobGroup

Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs.

Parameter properties

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

Parameter sets

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

-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
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

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

-LibraryServerManagementCredential

Specifies a Run As account for the VMM library.

Parameter properties

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

Parameter sets

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

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Parameter properties

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

Parameter sets

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

-RemoveVMNetwork

Removes network connectivity for one or more VM networks from the specified library server when used in conjunction with Set-SCVMLibraryServer.

Parameter properties

Type:

VMNetwork[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Parameter properties

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

Parameter sets

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

-VMHostGroup

Specifies a virtual machine host group object or an array of host group objects.

Parameter properties

Type:HostGroup
Default value:None
Supports wildcards:False
DontShow:False
Aliases:LibraryGroup

Parameter sets

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

-VMNetworks

Specifies that one or more VM networks have network connectivity to the specified library server when used in conjunction with Set-SCVMLibraryServer.

Parameter properties

Type:

VMNetwork[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMNetwork
Position:Named
Mandatory:True
Value from pipeline:False
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

LibraryServer

This cmdlet returns a LibraryServer object.

Notes

  • Requires a VMM library server object, which can be retrieved by using the Get-SCLibraryServer cmdlet.