Get-VPASCMComponentLogs


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

GET CONNECTOR MANAGEMENT CONNECTOR COMPONENT LOGS


Description:

USE THIS FUNCTION TO RETRIEVE CONNECTOR COMPONENT LOGS FROM CONNECTOR MANAGEMENT


Syntax:

Get-VPASCMComponentLogs -ConnectorID <String> -ComponentID <String> [-OutputDirectory <String>] [-token <Hashtable>] [<CommonParameters>]

Get-VPASCMComponentLogs -ConnectorID <String> -ComponentName <String> [-OutputDirectory <String>] [-token <Hashtable>] [<CommonParameters>]

Get-VPASCMComponentLogs -ConnectorHost <String> -ComponentName <String> [-OutputDirectory <String>] [-token <Hashtable>] [<CommonParameters>]

Get-VPASCMComponentLogs -ConnectorHost <String> -ComponentID <String> [-OutputDirectory <String>] [-token <Hashtable>] [<CommonParameters>]

Get-VPASCMComponentLogs -InputParameters <Hashtable> [-token <Hashtable>] [<CommonParameters>]


Parameters:

-ConnectorID <String>
UniqueID of the target connector in ConnectorManagement

Required: true
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-ConnectorHost <String>
Unique host of the target connector in ConnectorManagement
Host in this case can either be a hostname, a publicIP, or a PrivateIP

Required: true
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-ComponentID <String>
UniqueID of the target component for a connector in ConnectorManagement

Required: true
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-ComponentName <String>
Unique name of the target component for a connector in ConnectorManagement
Possible values: psm, cpm, cpm scanner, Management Agent

Required: true
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-OutputDirectory <String>
Where to place the generated logs

Required: false
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-InputParameters <Hashtable>
HashTable of values containing the parameters required to make the API call

Required: true
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

-token <Hashtable>
HashTable of data containing various pieces of login information (PVWA, LoginToken, HeaderType, etc).
If -token is not passed, function will use last known hashtable generated by New-VPASToken

Required: false
Position: named
Default value:
Accept pipeline input: true (ByPropertyName)
Accept wildcard characters: false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug
ErrorAction, ErrorVariable, WarningAction, WarningVariable
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216)


Examples:

$ComponentLogs = Get-VPASCMComponentLogs -ConnectorID {CONNECTOR ID VALUE} -ComponentID {COMPONENT ID VALUE}

$ComponentLogs = Get-VPASCMComponentLogs -ConnectorHost {CONNECTOR NAME VALUE} -ComponentName {COMPONENT NAME VALUE}

$InputParameters = @{
        ConnectorID = "ManagementAgent_fslkdj34890-1234-1234-asdf-0239kdf"
        ComponentID = "lkdfhj834920-zccv-1234-sdfg-slkdjf09458"
        OutputDirectory = "C:\temp\LogExports"
}
$ComponentLogs = Get-VPASCMComponentLogs -InputParameters $InputParameters

$InputParameters = @{
        ConnectorID = "ManagementAgent_fslkdj34890-1234-1234-asdf-0239kdf"
        ComponentName = "psm"|"cpm"|"cpm scanner"|"Management Agent"
        OutputDirectory = "C:\temp\LogExports"
}
$ComponentLogs = Get-VPASCMComponentLogs -InputParameters $InputParameters

$InputParameters = @{
        ConnectorHost = "VmanCon01.vman.com"
        ComponentID = "lkdfhj834920-zccv-1234-sdfg-slkdjf09458"
        OutputDirectory = "C:\temp\LogExports"
}
$ComponentLogs = Get-VPASCMComponentLogs -InputParameters $InputParameters

$InputParameters = @{
        ConnectorHost = "VmanCon01.vman.com"
        ComponentName = "psm"|"cpm"|"cpm scanner"|"Management Agent"
        OutputDirectory = "C:\temp\LogExports"
}
$ComponentLogs = Get-VPASCMComponentLogs -InputParameters $InputParameters


Outputs:

$true if successful

$false if failed