Public/Get-ViewGroupXml.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function Get-ViewGroupXml {
    [CmdletBinding()]
    param (
        # Specifies the View Group ID for which to retrieve the XML definition
        [Parameter(Mandatory, ValueFromPipelineByPropertyName)]
        [guid]
        $Id
    )

    begin {
        $svc = Get-IServerCommandService
    }

    process {
        $xml = $svc.GetViewGroupData((Get-Token), $Id).ViewGroupData.ViewGroupDataXml
        Write-Output $xml
    }
}