Cmdlets are functions written in PowerShell script language that execute commands in the Windows PowerShell environment. These Cmdlets allows App makers/Administrator to interact with Business Application Platform without having to go through the admin portal in a web browser.
To run the PowerShell cmdlets for PowerApps, need to install the PowerApps PowerShell module.
1. Run Windows PowerShell as an administrator
2. Install following modules
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell Install-Module -Name Microsoft.PowerApps.PowerShell -AllowClobber
3. It may prompted to accept the change to InstallationPolicy value of the repository, accept [A] Yes to all modules by typing 'A' and pressing 'Enter' for each module.
4. To Access any of the Cmdlets, you have the option to provide your credential using the following command. These credential are refreshed for up to 8 hours before you are signed in again to continue using the Cmdlets.
# This call opens prompt to collect credentials (Azure Active Directory account and password) used by the commands Add-PowerAppsAccount
# Here is how you can pass in credentials (avoiding opening a prompt) $pass = ConvertTo-SecureString "password" -AsPlainText -Force Add-PowerAppsAccount -Username foo@bar.com -Password $pass
To run the PowerShell cmdlets for PowerApps, need to install the PowerApps PowerShell module.
1. Run Windows PowerShell as an administrator
2. Install following modules
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell Install-Module -Name Microsoft.PowerApps.PowerShell -AllowClobber
3. It may prompted to accept the change to InstallationPolicy value of the repository, accept [A] Yes to all modules by typing 'A' and pressing 'Enter' for each module.
4. To Access any of the Cmdlets, you have the option to provide your credential using the following command. These credential are refreshed for up to 8 hours before you are signed in again to continue using the Cmdlets.
# This call opens prompt to collect credentials (Azure Active Directory account and password) used by the commands Add-PowerAppsAccount
# Here is how you can pass in credentials (avoiding opening a prompt) $pass = ConvertTo-SecureString "password" -AsPlainText -Force Add-PowerAppsAccount -Username foo@bar.com -Password $pass
Some list of commands for creators (app-makers)
Purpose
|
Cmdlet
|
Add a canvas app to a Common Data Service solution
|
SetPowerAppAsSolutionAware
|
Read environments
|
Get-PowerAppEnvironment (previously Get-PowerAppsEnvironment)
Get-FlowEnvironment |
Read, update, and delete a canvas app
|
Get-PowerApp (previously Get-App)
Remove-PowerApp (previously Remove-App) Publish-PowerApp (previously Publish-App) Set-AppDisplayName (previously Set-PowerAppDisplayName) Get-PowerAppVersion (previously Get-AppVersion) Restore-PowerAppVersion (previously Restore-AppVersion) |
Read, update, and delete canvas app permissions
|
Get-PowerAppRoleAssignment (previously Get-AppRoleAssignment)
Set-PowerAppRoleAssignment (previously Set-AppRoleAssignment) Remove-PowerAppRoleAssignment (previously Remove-AppRoleAssignment) |
Read, update, and delete a flow
|
Get-Flow
Get-FlowRun Enable-Flow Disable-Flow Remove-Flow |
Read, update, and delete flow permissions
|
Get-FlowOwnerRole
Set-FlowOwnerRole Remove-FlowOwnerRole |
Read and respond to flow approvals
|
Get-FlowApprovalRequest
Get-FlowApproval RespondTo-FlowApprovalRequest |
Read and delete connections
|
Get-PowerAppConnection (previously Get-Connection)
Remove-PowerAppConnection (previously Remove-Connection) |
Read, update, and delete connection permissions
|
Get-PowerAppConnectionRoleAssignment (previously
Get-ConnectionRoleAssignment)
Set-PowerAppConnectionRoleAssignment (previously Set-ConnectionRoleAssignment) Remove-PowerAppConnectionRoleAssignment (previously Remove-ConnectionRoleAssignment) |
Read and delete connectors
|
Get-PowerAppConnector (previously Get-Connector)
Remove-PowerAppConnector (previously Remove-Connector) |
Read, update, and delete custom connector permissions
|
Get-PowerAppConnectorRoleAssignment (previously
Get-ConnectorRoleAssignment)
Set-PowerAppConnectorRoleAssignment (previously Set-ConnectorRoleAssignment) Remove-PowerAppConnectorRoleAssignment (previously Remove-ConnectorRoleAssignment) |
Some list of commands for Administrators
Purpose
|
Cmdlets
|
Read, update, delete, and recover environments and Common Data Service
databases
|
New-AdminPowerAppEnvironment
Set-AdminPowerAppEnvironmentDisplayName Get-AdminPowerAppEnvironment (previously Get-AdminEnvironment) Remove-AdminPowerAppEnvironment (previously Remove-AdminEnvironment) Get-AdminPowerAppSoftDeletedEnvironment Recover-AdminPowerAppEnvironment New-AdminPowerAppCdsDatabase Get-AdminPowerAppCdsDatabaseLanguages Get-AdminPowerAppCdsDatabaseCurrencies Get-AdminPowerAppEnvironmentLocations |
Delete Common Data Service database
|
Remove-LegacyCDSDatabase *New*
|
Read, update, and delete environment permissions
These cmdlets only work today for environments that do not have a Common Data Service database. |
Get-AdminPowerAppEnvironmentRoleAssignment (previously
Get-AdminEnvironmentRoleAssignment)
Set-AdminPowerAppEnvironmentRoleAssignment (previously Set-AdminEnvironmentRoleAssignment) Remove-AdminPowerAppEnvironmentRoleAssignment (previously Remove-AdminEnvironmentRoleAssignment) |
Read, update, and remove canvas apps
|
Get-AdminPowerApp (previously Get-AdminApp)
Remove-AdminPowerApp (previously Remove-AdminApp) Get-AdminPowerAppConnectionReferences Set-AdminPowerAppAsFeatured Clear-AdminPowerAppAsFeatured Set-AdminPowerAppAsHero Clear-AdminPowerAppAsHero Set-AdminPowerAppApisToBypassConsent Clear-AdminPowerAppApisToBypassConsent |
Read, update, and delete canvas app permissions
|
Get-AdminPowerAppRoleAssignment (previously Get-AdminAppRoleAssignment)
Remove-AdminPowerAppRoleAssignment (previously Remove-AdminAppRoleAssignment) Set-AdminPowerAppRoleAssignment (previously Set-AdminAppRoleAssignment) Set-AdminPowerAppOwner (previously Set-AdminAppOwner) |
Read, update, and delete flows
|
Get-AdminFlow
Enable-AdminFlow Disable-AdminFlow Remove-AdminFlow Remove-AdminFlowApprovals |
Read, update, and delete flow permissions
|
Get-AdminFlowOwnerRole
Set-AdminFlowOwnerRole Remove-AdminFlowOwnerRole |
Read and delete connections
|
Get-AdminPowerAppConnection (previously Get-AdminConnection)
Remove-AdminPowerAppConnection (previously Remove-AdminConnection) |
Read, update, and delete connection permissions
|
Get-AdminPowerAppConnectionRoleAssignment (previously
Get-AdminConnectionRoleAssignment)
Set-AdminPowerAppEnvironmentConnectionRoleAssignment (previously Set-AdminConnectionRoleAssignment) Remove-AdminPowerAppConnectionRoleAssignment (previously Remove-AdminConnectionRoleAssignment) |
Read and delete custom connectors
|
Get-AdminPowerAppConnector (previously Get-AdminConnector)
Remove-AdminPowerAppConnector (previously Remove-AdminConnector) |
Read, update, and delete custom connector permissions
|
Get-AdminPowerAppConnectorRoleAssignment (previously
Get-AdminConnectorRoleAssignment)
Set-AdminPowerAppConnectorRoleAssignment (previously Set-AdminConnectorRoleAssignment) Remove-AdminPowerAppConnectorRoleAssignment (previously Remove-AdminConnectorRoleAssignment) |
Read a user's Power Apps user settings, user-app settings, and
notifications
|
Get-AdminPowerAppsUserDetails
|
Read and delete a user's Power Automate settings, which are not
visible to user, but that support flow execution
|
Get-AdminFlowUserDetails
Remove-AdminFlowUserDetails |
Create, read, update and delete data loss prevention policies for your
organization
|
Get-AdminDlpPolicy (previously Get-AdminApiPolicy)
New-AdminDlpPolicy (previously Add-AdminApiPolicy) Remove-AdminDlpPolicy (previously Remove-AdminApiPolicy) Set-AdminDlpPolicy (previously Set-AdminApiPolicy) Add-ConnectorToBusinessDataGroup Remove-ConnectorFromBusinessDataGroup Add-CustomConnectorToPolicy Remove-CustomConnectorFromPolicy |
Read and update tenant settings
|
Get-TenantSettings
Set-TenantSettings |
Read, add, or remove allowed consent/trial plans within the tenant
|
Remove-AllowedConsentPlans
Add-AllowedConsentPlans Get-AllowedConsentPlans |
No comments:
Post a Comment