Invoke-XenPIF
Invokes an operation on a PIF object.
Syntax
Invoke-XenPIF [-PIF] <PIF>
-XenAction {CreateVLAN | ReconfigureIp | ReconfigureIpv6 | Scan | Introduce | Forget | Unplug | Plug | DbIntroduce | DbForget}
[-PassThru] [-BestEffort] [-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [-Async]
[<CommonParameters>]
Invoke-XenPIF [-Ref] <XenRef[PIF]>
-XenAction {CreateVLAN | ReconfigureIp | ReconfigureIpv6 | Scan | Introduce | Forget | Unplug | Plug | DbIntroduce | DbForget}
[-PassThru] [-BestEffort] [-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [-Async]
[<CommonParameters>]
Invoke-XenPIF [-Uuid] <guid>
-XenAction {CreateVLAN | ReconfigureIp | ReconfigureIpv6 | Scan | Introduce | Forget | Unplug | Plug | DbIntroduce | DbForget}
[-PassThru] [-BestEffort] [-SessionOpaqueRef <string>] [-WhatIf] [-Confirm] [-Async]
[<CommonParameters>]
Description
Invokes an operation on a PIF object. Use the -XenAction parameter to select which operation to perform.
CreateVLAN: Create a VLAN interface from an existing physical interface. This call is deprecated: use VLAN.create instead. (Deprecated.)
ReconfigureIp: Reconfigure the IP address settings for this interface.
ReconfigureIpv6: Reconfigure the IPv6 address settings for this interface.
Scan: Scan for physical interfaces on a host and create PIF objects to represent them.
Introduce: Create a PIF object matching a particular network interface.
Forget: Destroy the PIF object matching a particular network interface.
Unplug: Attempt to bring down a physical interface.
Plug: Attempt to bring up a physical interface.
DbIntroduce: Create a new PIF record in the database only.
DbForget: Destroy a PIF database record.
Parameters
-Async
If set, the operation runs asynchronously and returns a Task object that can be used to track its progress.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-BestEffort
If set, the cmdlet continues processing further objects instead of throwing a terminating error when an operation fails for one object.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-BondSlaveOf
Indicates which bond this interface is part of. Accepted when -XenAction is DbIntroduce.
| Attribute | Value |
|---|---|
| Type | XenRef[Bond] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Confirm
Prompts for confirmation before running the cmdlet.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Aliases | cf |
-DNS
the new DNS settings. Accepted when -XenAction is ReconfigureIp, ReconfigureIpv6, DbIntroduce.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Device
physical interface on which to create the VLAN interface. Accepted when -XenAction is CreateVLAN, Introduce, DbIntroduce.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-DisallowUnplug
Prevent this PIF from being unplugged; set this to notify the management tool-stack that the PIF has a special use and should not be unplugged under any circumstances (for example, because you're running storage traffic over it). Accepted when -XenAction is DbIntroduce.
| Attribute | Value |
|---|---|
| Type | bool |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Gateway
the new gateway. Accepted when -XenAction is ReconfigureIp, ReconfigureIpv6, DbIntroduce.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-IP
the new IP address. Accepted when -XenAction is ReconfigureIp, DbIntroduce.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-IPv6
the new IPv6 address (in <addr>/<prefix length> format). Accepted when -XenAction is ReconfigureIpv6, DbIntroduce.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-IpConfigurationMode
Sets if and how this interface gets an IP address. Accepted when -XenAction is DbIntroduce.
| Attribute | Value |
|---|---|
| Type | ip_configuration_mode |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | None, DHCP, Static, unknown |
-Ipv6ConfigurationMode
Sets if and how this interface gets an IPv6 address. Accepted when -XenAction is DbIntroduce.
| Attribute | Value |
|---|---|
| Type | ipv6_configuration_mode |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | None, DHCP, Static, Autoconf, unknown |
-Ipv6Gateway
IPv6 gateway. Accepted when -XenAction is DbIntroduce.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-MAC
The MAC address of the interface. Accepted when -XenAction is Introduce, DbIntroduce.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-MTU
MTU in octets. Accepted when -XenAction is DbIntroduce.
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Managed
Indicates whether the interface is managed by xapi (defaults to "true"). Accepted when -XenAction is Introduce, DbIntroduce.
| Attribute | Value |
|---|---|
| Type | bool |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Management
Indicates whether the control software is listening for connections on this interface. Accepted when -XenAction is DbIntroduce.
| Attribute | Value |
|---|---|
| Type | bool |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Mode
whether to use dynamic/static/no-assignment. Accepted when -XenAction is ReconfigureIp, ReconfigureIpv6.
| Attribute | Value |
|---|---|
| Type | ip_configuration_mode |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | None, DHCP, Static, unknown |
-Netmask
the new netmask. Accepted when -XenAction is ReconfigureIp, DbIntroduce.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Network
network to which this interface should be connected. Accepted when -XenAction is CreateVLAN, DbIntroduce.
| Attribute | Value |
|---|---|
| Type | XenRef[Network] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-OtherConfig
Additional configuration. Accepted when -XenAction is DbIntroduce.
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-PIF
The PIF object to operate on.
| Attribute | Value |
|---|---|
| Type | PIF |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByValue) |
-PassThru
If set, the cmdlet returns the affected object. By default the cmdlet does not generate any output.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Physical
true if this represents a physical network interface. Accepted when -XenAction is DbIntroduce.
| Attribute | Value |
|---|---|
| Type | bool |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-PrimaryAddressType
Which protocol should define the primary address of this interface. Accepted when -XenAction is DbIntroduce.
| Attribute | Value |
|---|---|
| Type | primary_address_type |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | IPv4, IPv6, unknown |
-Properties
Additional configuration properties for the interface. Accepted when -XenAction is DbIntroduce.
| Attribute | Value |
|---|---|
| Type | hashtable |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Ref
The PIF object to operate on, specified by its opaque reference.
| Attribute | Value |
|---|---|
| Type | XenRef[PIF] |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByPropertyName) |
| Aliases | opaque_ref |
-SessionOpaqueRef
The session object on which to run the cmdlet. This overrides the default session and lets you target a specific open XenServer connection.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Uuid
The UUID of the PIF to operate on.
| Attribute | Value |
|---|---|
| Type | guid |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByPropertyName) |
-VLAN
VLAN tag for the new interface. Accepted when -XenAction is CreateVLAN, DbIntroduce.
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-VLANMasterOf
Indicates which VLAN this interface receives untagged traffic from. Accepted when -XenAction is DbIntroduce.
| Attribute | Value |
|---|---|
| Type | XenRef[VLAN] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
| Aliases | wi |
-XenAction
Selects which action to use.
| Attribute | Value |
|---|---|
| Type | XenPIFAction |
| Required | True |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | CreateVLAN, ReconfigureIp, ReconfigureIpv6, Scan, Introduce, Forget, Unplug, Plug, DbIntroduce, DbForget |
-XenHost
physical machine to which this PIF is connected. Accepted when -XenAction is CreateVLAN, Scan, Introduce, DbIntroduce.
| Attribute | Value |
|---|---|
| Type | XenRef[Host] |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
Inputs
-
PIF -
XenRef[PIF] -
guid
Outputs
-
System.Object
Examples
Example 1: Run the CreateVLAN operation
PS> Get-XenPIF -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff | Invoke-XenPIF -XenAction CreateVLAN -PassThru
Invokes the CreateVLAN operation on a PIF. -PassThru writes the result to the pipeline.
Example 2: Run the CreateVLAN operation by uuid
PS> Invoke-XenPIF -XenAction CreateVLAN -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff -PassThru
Invokes the CreateVLAN operation on a PIF. -Uuid is the way to be sure of exactly one object. -PassThru writes the result to the pipeline.
Example 3: Run CreateVLAN asynchronously
PS> Invoke-XenPIF -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff -XenAction CreateVLAN -Async -PassThru | Wait-XenTask -ShowProgress
Runs the same operation asynchronously and follows the task it returns.
Related links
-
Class: PIF
-
Using the XenServer PowerShell module