Set-IscsiTargetServerSetting
Set-IscsiTargetServerSetting
Sets the global settings or common configurations for an iSCSI target server.
Syntax
Parameter Set: __AllParameterSets
Set-IscsiTargetServerSetting [-IP] <String> [-ComputerName <String> ] [-Credential <PSCredential> ] [-Enable <Boolean> ] [-PassThru] [-Port <Int32> ] [ <CommonParameters>]
Detailed Description
The Set-IscsiTargetServerSetting cmdlet sets the global settings or common configurations for an iSCSI target.
Parameters
-ComputerName<String>
Specifies the computer name, or IP address, of the remote computer, if this cmdlet is run on a remote computer.
Specifies the cluster resource group network name, or cluster node name, if this cmdlet is run on a cluster configuration.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Credential<PSCredential>
Specifies the credentials when connecting to a remote computer.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Enable<Boolean>
Specifies the portal state as set by the user.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-IP<String>
Specifies one or more IP addresses.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Port<Int32>
Specifies the port number to which the iSCSI target should listen.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- Microsoft.Iscsi.Target.Commands.IscsiCommonSettings
Outputs
The output type is the type of the objects that the cmdlet emits.
- Microsoft.Iscsi.Target.Commands.IscsiTargetServerSetting
Examples
EXAMPLE 1
This example sets the target portal with the IP address 1.1.1.1 to use port number3200 (where the default is port number 3260).
PS C:\> Set-IscsiTargetServerSetting -IP 1.1.1.1 -Port 3200
EXAMPLE 2
This example disables the target portal with the IP address 1.1.1.1.
PS C:\> Set-IscsiTargetServerSetting -IP 1.1.1.1 -Enable $false
EXAMPLE 3
This example enables the target portal with the IP address 1.1.1.1 and changes the port number to 3200.
PS C:\> Set-IscsiTargetServerSetting -IP 1.1.1.1 -Port 3200 -Enable $true