< Back

Invoke-PowerAppsChecker

Sat Jan 18, 2020 3:52 pm

NAME Invoke-PowerAppsChecker



SYNOPSIS

This topic is pre-release documentation and is subject to change.



Performs the actions necessary for initiating an analysis job with the PowerApps checker service and waits for and

downloads the results.





SYNTAX

Invoke-PowerAppsChecker [-ApiUrl] <Uri> [-ClientApplicationId <Guid>] [-ClientApplicationSecret <SecureString>]

[-ExcludedFileNamePattern <String[]>] [-FileUnderAnalysis <String[]>] [-FileUnderAnalysisSasUri <String[]>]

[-LocaleName {bg | ca | cs | da | de | el | en | es | et | eu | fi | fr | gl | hi | hr | hu | id | it | ja | kk |

ko | lt | lv | ms | nb | nl | pl | pt-BR | pt-pt | ro | ru | sk | sl | sr-Cyrl-RS | sr-Latn-RS | sv | th | tr | uk

| vi | zh-HANS | zh-HANT}] [-MaxConnectionTimeOutMinutes <Int32>] [-MaxStatusChecks <Int32>] [-OutputDirectory

<String>] [-Rule <Rule[]>] [-Ruleset <Ruleset[]>] [-SecondsBetweenChecks <Int32>] [-TenantId <Guid>]

[-RuleLevelOverrides <Rule[]>] [<CommonParameters>]



Invoke-PowerAppsChecker [[-Geography] {PreviewUnitedStates | UnitedStates | Europe | Asia | Australia | Japan |

India | Canada | SouthAmerica | UnitedKingdom | France}] [-ClientApplicationId <Guid>] [-ClientApplicationSecret

<SecureString>] [-ExcludedFileNamePattern <String[]>] [-FileUnderAnalysis <String[]>] [-FileUnderAnalysisSasUri

<String[]>] [-LocaleName {bg | ca | cs | da | de | el | en | es | et | eu | fi | fr | gl | hi | hr | hu | id | it

| ja | kk | ko | lt | lv | ms | nb | nl | pl | pt-BR | pt-pt | ro | ru | sk | sl | sr-Cyrl-RS | sr-Latn-RS | sv |

th | tr | uk | vi | zh-HANS | zh-HANT}] [-MaxConnectionTimeOutMinutes <Int32>] [-MaxStatusChecks <Int32>]

[-OutputDirectory <String>] [-Rule <Rule[]>] [-Ruleset <Ruleset[]>] [-SecondsBetweenChecks <Int32>] [-TenantId

<Guid>] [-RuleLevelOverrides <Rule[]>] [<CommonParameters>]





DESCRIPTION

The Invoke-PowerAppsChecker cmdlet first, uploads the file specified by the FileUnderAnalysis parameter, if

provided, next submits an analysis job with the PowerApps checker service, monitors for status updates, and when

completed, downloads a compressed report file. The file provided is a JSON formatted report, which is in Static

Analysis Results Interchange Format (SARIF). A `Microsoft.PowerApps.Checker.Client.Models.AnalyzeResult` object is

returned.





PARAMETERS

-ApiUrl <Uri>

URL of the PowerApps checker root service endpoint. Unless provided a direct URL from Microsoft, Geography

should be used.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ClientApplicationId <Guid>

Id of the client application registered in your tenant that will be used to connect to the service. This is

the identifier used while processing analysis requests in the PowerApps checker service. The client

application must reside in the tenant provided as well as have access to the PowerApps-Advisor APIs.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ClientApplicationSecret <SecureString>

Used as a credential, along with what is specified in the ClientApplicationId, for authenticating against

Azure Active Directory. A token is generated and submitted along with the request to the PowerApps checker

service. For more information about how to create a secret, see Certificates and secrets

(/azure/active-directory/develop/howto-create-service-principal-portal#certificates-and-secrets).



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ExcludedFileNamePattern <String[]>

List the names of files to be excluded from the analysis. It can include a full file name or a name with

leading or trailing wildcards, such as- jquery or form.js



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-FileUnderAnalysis <String[]>

One or more paths to local files to be uploaded and used as part of the analysis. Notice that each file must

be under 30 MB. If you have a file over 30 MB you must upload it to your blob storage and provide a SAS URI in

the `FileUnderAnalysisSasUri` parameter.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-FileUnderAnalysisSasUri <String[]>

One or more paths to a file uploaded in a location accessible by URL, for example, Azure blob storage. This

path must be available with no other credentials required, commonly referred to as a SAS URL. For more

information about how to upload to Azure blob storage, see Upload, download, and list blobs by using Azure

PowerShell (/azure/storage/blobs/storage-quickstart-blobs-powershell).



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Geography <ApiGeography>

The PowerApps checker service temporarily stores the data that you upload in Azure along with the reports that

are generated. By specifying a geography, you can control where the data is stored. If no geography is

specified, then United States is the default.



Required? false

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-LocaleName <String>

Specifies the language code that determines how the results are listed, such as es , for Spanish. The

languages that are supported are included in the validation set of the parameter.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-MaxConnectionTimeOutMinutes <Int32>

Maximum number in minutes to wait before quitting a web based operation.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-MaxStatusChecks <Int32>

Maximum number of times in which status calls are made to the service. The default number is 20, which in most

cases is sufficient. If the threshold is exceeded, then a timeout exception is thrown.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-OutputDirectory <String>

Directory in which the resulting reports are to be downloaded. This directory must already exist or it will

not pass validation.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Rule <Rule[]>

One or more rule that are to be run as part of the analysis. This is of type

`Microsoft.PowerApps.Checker.Client.Models.Rule[]`. The Rule object should minimally contain the `RuleCode`

property. You can also use what is returned from a call to the `Get-PowerAppsCheckerRule` cmdlet. This

parameter can be used instead of or in combination with the `Ruleset` parameter. At least one of these two

parameters must be provided.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Ruleset <Ruleset[]>

One or more rulesets that contain the rules that are to be run as part of the analysis. This is of type

`Microsoft.PowerApps.Checker.Client.Models.Ruleset[]`. The Ruleset object should minimally contain the `Id` or

`Name` property. You can also use what is returned from a call to the `Get-PowerAppsCheckerRuleset` cmdlet.

This parameter can be used instead of or in combination with the `Rule` parameter. At least one of these two

parameters must be provided.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-SecondsBetweenChecks <Int32>

The number of seconds between status checks. The default is 15 seconds.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-TenantId <Guid>

Id of your tenant. It is also referred to as the directory Id. It can be found in the overview properties of

Azure Active Directory in your Azure subscription.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RuleLevelOverrides <Rule[]>

Use this parameter including values created from `New-PowerAppsCheckerRuleLevelOverride` to set the service to

treat violations of a rule as a higher or lower severity level.



Required? false

Position? named

Default value None

Accept pipeline input? False

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





Microsoft.PowerApps.Checker.Client.Models.Ruleset[]





Microsoft.PowerApps.Checker.Client.Models.Rule[]





System.Int32





System.Guid





System.Security.SecureString





System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]





System.Uri





Microsoft.PowerApps.Checker.PowerShell.ApiGeography







OUTPUTS

System.Object







NOTES









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



PS C:\\> $rulesets = Get-PowerAppsCheckerRulesets -Geography Europe

PS C:\\> $rulesetToUse = $rulesets | where Name -EQ 'AppSource Certification'

PS C:\\> $analyzeResult = Invoke-PowerAppsChecker -Geography Europe -ClientApplicationId

'dc316d60-f8a8-4b75-b835-ba81054a0b0e' `

-TenantId '3a11a289-d956-408f-92f6-eddb3413abc2' -Ruleset $rulesetToUse -FileUnderAnalysis

"C:\\src\\mysolution.zip" `

-OutputDirectory "C:\\out"



In this example the data is run in the European data centers and using the AppSource Certification ruleset as the

list of rules for the PowerApps checker service to use in its analysis. This is an example of an interactive

approach. A prompt will be received to login to the Azure tenant. The user must reside in the tenant provided as

well as have access to login to the application provided.

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



PS C:\\> $rulesets = Get-PowerAppsCheckerRulesets -Geography Europe

PS C:\\> $rulesetToUse = $rulesets | where Name -NE 'AppSource Certification'

PS C:\\> $analyzeResult = Invoke-PowerAppsChecker -Geography Europe -ClientApplicationId

'dc316d60-f8a8-4b75-b835-ba81054a0b0e' `

-TenantId '3a11a289-d956-408f-92f6-eddb3413abc2' -Ruleset $rulesetToUse -FileUnderAnalysis

"C:\\src\\mysolution.zip" `

-OutputDirectory "C:\\out" -ClientApplicationSecret (ConvertTo-SecureString -AsPlainText -Force -String

'*************************************')



In this example the data is run in the European data centers and using the AppSource Certification ruleset as the

list of rules for the PowerApps checker service to use in its analysis. This is an example of an approach to be

used in non-interactive scenarios,such as automated builds and deployments. No prompt will be received to login to

the Azure tenant.

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



PS C:\\> $rulesets = Get-PowerAppsCheckerRulesets -Geography UnitedStates

PS C:\\> $rulesetToUse = $rulesets | where Name -EQ 'AppSource Certification'

PS C:\\> $overrides = New-PowerAppsCheckerRuleLevelOverride -Id 'meta-avoid-silverlight' -OverrideLevel High

PS C:\\> $analyzeResult = Invoke-PowerAppsChecker -Geography UnitedStates -ClientApplicationId

'dc316d60-f8a8-4b75-b835-ba81054a0b0e' `

-TenantId '3a11a289-d956-408f-92f6-eddb3413abc2' -Ruleset $rulesetToUse -FileUnderAnalysis

"C:\\src\\mysolution.zip" `

-RuleLevelOverrides $overrides -OutputDirectory "C:\\out"



In this example the data is run in the United States data centers using the AppSource Certification ruleset as the

list of rules for the PowerApps checker service to use in its analysis. If there are any violations of the

meta-avoid-silverlight rule, they are treated as a severity level of High. This is an example of an interactive

approach. A prompt is received to sign in to the Azure tenant. The user must reside in the tenant provided as well

as have access to sign in to the application provided.



RELATED LINKS

Online Version: https://go.microsoft.com/fwlink/?linkid=2094408

New-PowerAppsCheckerRuleLevelOverride

Find your Office 365 tenant ID https://docs.microsoft.com/onedrive/fin ... -tenant-id