1
+ # Requires -Version 5.0
2
+ # Requires -Modules Microsoft .PowerApps .Administration .PowerShell
3
+
4
+ <#
5
+ . SYNOPSIS
6
+ Generates a report with all supported CDS database languages
7
+
8
+ . DESCRIPTION
9
+
10
+ . NOTES
11
+ This PowerShell script was developed and optimized for ScriptRunner. The use of the scripts requires ScriptRunner.
12
+ The customer or user is authorized to copy the script from the repository and use them in ScriptRunner.
13
+ The terms of use for ScriptRunner do not apply to this script. In particular, ScriptRunner Software GmbH assumes no liability for the function,
14
+ the use and the consequences of the use of this freely available script.
15
+ PowerShell is a product of Microsoft Corporation. ScriptRunner is a product of ScriptRunner Software GmbH.
16
+ © ScriptRunner Software GmbH
17
+
18
+ . COMPONENT
19
+ Requires Module Microsoft.PowerApps.Administration.PowerShell
20
+ Requires Library script PAFLibrary.ps1
21
+ Requires Library Script ReportLibrary from the Action Pack Reporting\_LIB_
22
+
23
+ . LINK
24
+ https://github.com/scriptrunner/ActionPacks/tree/master/O365/PowerApps/_REPORTS_
25
+
26
+ . Parameter PACredential
27
+ [sr-en] Provides the user ID and password for PowerApps credentials
28
+ [sr-de] Benutzername und Passwort für die Anmeldung
29
+
30
+ . Parameter LocationName
31
+ [sr-en] The location of the current environment
32
+ [sr-de] Standort der aktuellen Umgebung
33
+
34
+ . Parameter Filter
35
+ [sr-en] Finds languages matching the specified filter (wildcards supported)
36
+ [sr-de] Sprachen Filter (wildcards werden unterstützt)
37
+
38
+ . Parameter ApiVersion
39
+ [sr-en] The api version to call with
40
+ [sr-de] Verwendete API Version
41
+ #>
42
+
43
+ [CmdLetBinding ()]
44
+ Param (
45
+ [Parameter (Mandatory = $true )]
46
+ [pscredential ]$PACredential ,
47
+ [Parameter (Mandatory = $true )]
48
+ [string ]$LocationName ,
49
+ [string ]$Filter ,
50
+ [string ]$ApiVersion
51
+ )
52
+
53
+ Import-Module Microsoft.PowerApps.Administration.PowerShell
54
+
55
+ try {
56
+ [string []]$Properties = @ (' LanguageName' , ' LanguageDisplayName' , ' IsTenantDefaultLanguag' , ' LanguageLocalizedDisplayName' )
57
+ ConnectPowerApps - PAFCredential $PACredential
58
+
59
+ [hashtable ]$getArgs = @ {' ErrorAction' = ' Stop'
60
+ ' LocationName' = $LocationName
61
+ }
62
+
63
+ if ([System.String ]::IsNullOrWhiteSpace($Filter ) -eq $false ){
64
+ $getArgs.Add (' Filter' , $Filter )
65
+ }
66
+ if ([System.String ]::IsNullOrWhiteSpace($ApiVersion ) -eq $false ){
67
+ $getArgs.Add (' ApiVersion' , $ApiVersion )
68
+ }
69
+
70
+ $result = Get-AdminPowerAppCdsDatabaseLanguages @getArgs | Select-Object $Properties
71
+
72
+ if ($SRXEnv ) {
73
+ ConvertTo-ResultHtml - Result $result
74
+ }
75
+ else {
76
+ Write-Output $result
77
+ }
78
+ }
79
+ catch {
80
+ throw
81
+ }
82
+ finally {
83
+ DisconnectPowerApps
84
+ }
0 commit comments