Microsoft has released a preview version of PowerShell for PowerApps but actually you can use this PowerShell to manage your flows in general. It all starts by installing the PowerShell module as described in the earlier mentioned article. Please don’t forgte to unblock the files that you downloaded otherwise your module will not load properly.

The first Cmdlet that I’m interested in is Get-Flow

No current session is the message that you will get returned. It would be nice to see a Connect-… Cmdlet but in this module it is called Add-PowerAppsAccount. This is a bit of a shame as it feels like a missed opportunity to make PowerApps and Flow use the same connection command.

Anyway, the Add-PowerAppsAccount works and asks me for a login. Once connected, I  can get to my flows.

Now looking at all the exported commands available within the PowerShell module. We find a lot more options

 

PS C:\Temp\PowerAppsPowerShell> $module = (Get-Module Microsoft.PowerApps.PowerShell )

PS C:\Temp\PowerAppsPowerShell> $module.ExportedCommands

Add-PowerAppsAccount
BuildApprovalResponse
BuildFilterPattern
CreateAppObject
CreateAppRoleAssignmentObject
CreateApprovalObject
CreateApprovalRequestObject
CreateAppVersionObject
CreateConnectionObject
CreateConnectionRoleAssignmentObject
CreateConnectorObject
CreateConnectorRoleAssignmentObject
CreateEnvironmentObject
CreateFlowObject
CreateFlowRoleAssignmentObject
CreateFlowRunObject
CreateGroupObject
CreateHttpResponse
CreatePowerAppsNotificationObject
CreateTenantObject
CreateUserObject
Disable-Flow
Enable-Flow
Get-App
Get-AppRoleAssignment
Get-AppVersion
Get-AudienceForHostName
Get-Connection
Get-ConnectionRoleAssignment
Get-Connector
Get-ConnectorRoleAssignment
Get-FilteredEnvironments
Get-Flow
Get-FlowApproval
Get-FlowApprovalRequest
Get-FlowEnvironment
Get-FlowOwnerRole
Get-FlowRun
Get-JwtToken
Get-JwtTokenClaims
Get-PowerAppsEnvironment
Get-PowerAppsNotification
Get-TenantDetailsFromGraph
Get-UsersOrGroupsFromGraph
Invoke-OAuthDialog
Invoke-Request
InvokeApi
Publish-App
Remove-App
Remove-AppRoleAssignment
Remove-Connection
Remove-ConnectionRoleAssignment
Remove-Connector
Remove-ConnectorRoleAssignment
Remove-Flow
Remove-FlowOwnerRole
Remove-PowerAppsAccount
ReplaceMacro
ResolveEnvironment
RespondTo-FlowApprovalRequest
Restore-AppVersion
Select-CurrentEnvironment
Set-AppDisplayName
Set-AppRoleAssignment
Set-ConnectionRoleAssignment
Set-ConnectorRoleAssignment
Set-FlowOwnerRole
Test-PowerAppsAccount

We shouldn’t forget that this is only a preview version. Therefore it might be acceptable that the PowerShell naming standards for Cmdlets hasn’t been followed! This standard is Verb-Object and the verbs should come from the list of Verb given by Get-Verb.

Get-FlowRun also gives very limited information.

At this stage the PowerShell commands are your preview and it looks like all the commands that have been implemented are very technical and very limited. I’m looking forward to future versions as it will be great to be able to manage Microsoft Flow and PowerApps through PowerShell.

 

 

Advertisements