Invoke-VPASMetricsPSM


Supported Environments:
SelfHosted
SharedServices
PCloudStandard


Synopsis:

RUN VARIOUS PSM METRICS FROM CYBERARK


Description:

USE THIS FUNCTION TO GENERATE VARIOUS PSM RELATED METRICS FROM CYBERARK


Syntax:

Invoke-VPASMetricsPSM -TargetMetric <String> -MetricFormat <String> [-OutputDirectory <String>] -DayRange <String> [-AmtOfSets <String>] [-HTMLChart <String>] [-AmtOfUsers <String>] [-HideRawData] [-IgnorePlatforms <String[]>] [-IgnoreUsernames <String[]>]

[-PlatformSearchQuery <String[]>] [-UsernameSearchQuery <String[]>] [-token <Hashtable>] [<CommonParameters>]

Invoke-VPASMetricsPSM -InputParameters <Hashtable> [-token <Hashtable>] [<CommonParameters>]


Parameters:

-TargetMetric <String>
Specify which report will be run
Possible values: PSMSessionsInXDays, PSMUtilizationForXDays, PSMConnectionComponentsInXDays, UsersConnectingWithPSMInXDays

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

-MetricFormat <String>
Specify the report output format
NONE will return the generated hashtable of data that can be assigned to a variable
Possible values: JSON, HTML, ALL, NONE

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

-OutputDirectory <String>
Specify where the location for report output to be saved

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

-DayRange <String>
Specify the date range for the selected metric report

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

-AmtOfSets <String>
Specify the length of historic data to be included in the metric report

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

-HTMLChart <String>
Specify the HTML report type
Possible values: BarGraph, LineGraph, PieChart, ALL

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

-AmtOfUsers <String>
Specify the amount of users to be included in the metric

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

-HideRawData [<SwitchParameter>]
Removes the RawData visual from the exported output
Helpful when exporting to a PDF or document to remove extra not needed information

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

-IgnorePlatforms <String[]>
Wildcard value that will cause a record to be ignored from the metrics if the target record PlatformID matches

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

-IgnoreUsernames <String[]>
Wildcard value that will cause a record to be ignored from the metrics if the target record Username matches

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

-PlatformSearchQuery <String[]>
Wildcard value that will limit the metrics to only target records that match the searchquery via platformID

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

-UsernameSearchQuery <String[]>
Wildcard value that will limit the metrics to only target records that match the searchquery via account username

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:

$GenerateReport = Invoke-VPASMetricsPSM -TargetMetric PSMConnectionComponentsInXDays -MetricFormat ALL -OutputDirectory C:\Temp\Metrics\PSMMetrics -HTMLChart ALL -DayRange 30

$GenerateReport = Invoke-VPASMetricsPSM -TargetMetric PSMSessionsInXDays -MetricFormat ALL -OutputDirectory C:\Temp\Metrics\PSMMetrics -HTMLChart ALL -DayRange 7 -AmtOfSets 4

$GenerateReport = Invoke-VPASMetricsPSM -TargetMetric PSMUtilizationForXDays -MetricFormat ALL -OutputDirectory C:\Temp\Metrics\PSMMetrics -HTMLChart ALL -DayRange 30

$GenerateReport = Invoke-VPASMetricsPSM -TargetMetric UsersConnectingWithPSMInXDays -MetricFormat ALL -OutputDirectory C:\Temp\Metrics\PSMMetrics -HTMLChart ALL -DayRange 30 -AmtOfUsers 10

$InputParameters = @{
        TargetMetric = "PSMSessionsInXDays"|"PSMUtilizationForXDays"|"PSMConnectionComponentsInXDays"|"UsersConnectingWithPSMInXDays"
        MetricFormat = "JSON"|"HTML"|"ALL"|"NONE"
        OutputDirectory = "C:\temp\ReportOutputs"
         HTMLChart = "BarGraph"|"LineGraph"|"PieChart"|"ALL"
         DayRange = "7"
         AmtOfSets = "4"
         HideRawData = $true|$false
         AmtOfUsers = "5"
         IgnorePlatforms = @("WinDomain","WinLocal")
         IgnoreUsernames = @("IgnoreUsername1")
         PlatformSearchQuery = @("norotate","store")
         UsernameSearchQuery = @("TargetUser1","TargetUser3")
}
$GenerateReport = Invoke-VPASMetricsPSM -InputParameters $InputParameters


Outputs:

HashTable object if successful

$false if failed