Get-XenMessageProperty
Gets a property of a Message object.
Syntax
Get-XenMessageProperty [-Message] <Message> -XenProperty {Since} [-BestEffort]
[-SessionOpaqueRef <string>] [<CommonParameters>]
Get-XenMessageProperty [-Ref] <XenRef[Message]> -XenProperty {Since} [-BestEffort]
[-SessionOpaqueRef <string>] [<CommonParameters>]
Description
Gets a specified property of a Message object. Use the -XenProperty parameter to select which property to retrieve.
Since
Parameters
-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 |
-Message
The Message object to operate on.
| Attribute | Value |
|---|---|
| Type | Message |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByValue) |
-Ref
The Message object to operate on, specified by its opaque reference.
| Attribute | Value |
|---|---|
| Type | XenRef[Message] |
| 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 |
-Since
The cutoff time. When the timezone is missing, UTC is assumed. Accepted when -XenProperty is Since.
| Attribute | Value |
|---|---|
| Type | DateTime |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-XenProperty
Selects which property to use.
| Attribute | Value |
|---|---|
| Type | XenMessageProperty |
| Required | True |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | Since |
Inputs
-
Message -
XenRef[Message]
Outputs
-
System.Object
Examples
Example 1: Get the Since property
PS> Get-XenMessage -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff | Get-XenMessageProperty -XenProperty Since
Gets the Since property of a Message.
Example 2: Get the Since property by reference
PS> Get-XenMessageProperty -XenProperty Since -Ref OpaqueRef:f433bf7b-2b0c-5f53-7018-7d195addb3ca
Gets the Since property of a Message. -Ref takes the opaque reference, which is what the API itself uses and what the records hold.
Example 3: Run against a particular session
PS> Get-XenMessage -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff | Get-XenMessageProperty -XenProperty Since -SessionOpaqueRef $session.opaque_ref
Every cmdlet takes -SessionOpaqueRef, which runs it against a session opened with Connect-XenServer rather than the default one. It is how a script drives more than one server at a time.
Related links
-
Class: Message
-
Using the XenServer PowerShell module