< Back

Get-JCPolicyResult

Thu Jan 16, 2020 8:53 am

NAME Get-JCPolicyResult



SYNOPSIS

Returns all JumpCloud results for a given policy within a JumpCloud tenant.





SYNTAX

Get-JCPolicyResult [-PolicyID] <System.String> [-ByPolicyID] [<CommonParameters>]



Get-JCPolicyResult [-BySystemID] -SystemID <System.String> [<CommonParameters>]



Get-JCPolicyResult [-PolicyName] <System.String> [<CommonParameters>]



Get-JCPolicyResult [-PolicyResultID <System.String>] [<CommonParameters>]





DESCRIPTION

The Get-JCPolicyResult function returns the latest policy result information from a JumpCloud policy. You can

search by a specific policy name to return results from the policy being applied. You can also search by a

specific systemId to find the latest policy result for a specific system.





PARAMETERS

-ByPolicyID <System.Management.Automation.SwitchParameter>

The -ByPolicyID switch parameter will enforce the ByPolicyID parameter set and improve performance of

gathering multiple policy results via the pipeline when the input object contains a property with PolicyID.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-BySystemID <System.Management.Automation.SwitchParameter>

The -BySystemID switch parameter will enforce the BySystemID parameter set and search for results by SystemID.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PolicyID <System.String>

The PolicyID of the JumpCloud policy you wish to query.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PolicyName <System.String>

The PolicyName of the JumpCloud policy you wish to query.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PolicyResultID <System.String>

The PolicyResultID of the JumpCloud policy result you wish to query.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-SystemID <System.String>

The SystemID of the JumpCloud system you wish to query the latest policy result of.



Required? true

Position? named

Default value None

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).



INPUTS

System.String





System.Management.Automation.SwitchParameter







OUTPUTS

System.Object







NOTES









-------------------------- Example 1 --------------------------



PS C:\\> Get-JCPolicyResult 'HelloWorld'



Returns the latest policy result for the HelloWorld policy.

-------------------------- Example 2 --------------------------



PS C:\\> Get-JCPolicyResult -PolicyId 123456789



Returns the latest policy result for the policy with the id of 123456789.

-------------------------- Example 3 --------------------------



PS C:\\> Get-JCPolicyResult -SystemID 123456789



Returns the latest policy result for a system with the id of 123456789.



RELATED LINKS

Online Version: https://github.com/TheJumpCloud/support ... licyResult