Skip to content

Commit c5a4d43

Browse files
AMSoftwareNLArjan Meskers
andauthored
3 dev functions (#11)
* Import, Export, and Upgrade Solution Functions * Import and Export Assembly, Translations, and WebResources Functions * Import and Export File and Image Column content Functions * Publish Customizations Function * Remove Register and Unregister Plugin functions. Are covered by PRT. --------- Co-authored-by: Arjan Meskers <arjanmeskers@outlook.com>
1 parent b2ac568 commit c5a4d43

48 files changed

Lines changed: 1529 additions & 1140 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/launch.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
52
"version": "0.2.0",
63
"configurations": [
74
{
8-
"name": "PowerShell: Binary Module Interactive",
5+
"name": "PowerShell: Module Interactive Session",
96
"type": "PowerShell",
107
"request": "launch",
11-
"script": "Import-Module -Scope Local -Force .\\src\\AMSoftware.Dataverse.PowerShell\\bin\\Debug\\AMSoftware.Dataverse.PowerShell.psd1",
8+
"script": "Import-Module -Force .\\src\\AMSoftware.Dataverse.PowerShell\\bin\\Debug\\AMSoftware.Dataverse.PowerShell.psd1",
129
"createTemporaryIntegratedConsole": true,
13-
"attachDotnetDebugger": true
10+
"attachDotnetDebugger": false,
11+
"preLaunchTask": "Module: Build"
1412
}
1513
]
1614
}

.vscode/tasks.json

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Build Debug",
6+
"command": "dotnet",
7+
"type": "process",
8+
"args": [
9+
"build",
10+
"${workspaceFolder}/src/",
11+
"--no-incremental"
12+
],
13+
"problemMatcher": "$msCompile",
14+
"group":{
15+
"kind": "build",
16+
"isDefault": true
17+
}
18+
},
19+
{
20+
"label": "Build Release",
21+
"command": "dotnet",
22+
"type": "process",
23+
"args": [
24+
"build",
25+
"${workspaceFolder}/src/",
26+
"--no-incremental",
27+
"-c",
28+
"Release"
29+
],
30+
"group": "build",
31+
"hide": true
32+
},
33+
{
34+
"label": "Build Docs",
35+
"type": "shell",
36+
"command": "./tasks/build-docs.ps1",
37+
"presentation": {
38+
"echo": true,
39+
"reveal": "always",
40+
"focus": true,
41+
"panel": "new",
42+
"showReuseMessage": true,
43+
"clear": false
44+
},
45+
"group": "build",
46+
"dependsOn": "Build Debug"
47+
},
48+
{
49+
"label": "Build Help",
50+
"type": "shell",
51+
"command": "./tasks/build-externalhelp.ps1",
52+
"presentation": {
53+
"echo": true,
54+
"reveal": "always",
55+
"focus": true,
56+
"panel": "new",
57+
"showReuseMessage": true,
58+
"clear": false
59+
},
60+
"group": "build",
61+
"dependsOn": "Build Release",
62+
"hide": true
63+
},
64+
{
65+
"label": "Distribute",
66+
"type": "shell",
67+
"command": "./tasks/build-dist.ps1",
68+
"presentation": {
69+
"echo": true,
70+
"reveal": "always",
71+
"focus": true,
72+
"panel": "new",
73+
"showReuseMessage": true,
74+
"clear": false
75+
},
76+
"group": "build",
77+
"dependsOn": [
78+
"Build Release",
79+
"Build Help"
80+
]
81+
},
82+
{
83+
"label": "Publish",
84+
"type": "shell",
85+
"command": "./tasks/publish.ps1",
86+
"presentation": {
87+
"echo": true,
88+
"reveal": "always",
89+
"focus": true,
90+
"panel": "new",
91+
"showReuseMessage": true,
92+
"clear": false
93+
},
94+
"group": "build",
95+
"dependsOn": [
96+
"Distribute"
97+
]
98+
},
99+
{
100+
"label": "Test: Module",
101+
"type": "shell",
102+
"command": "./tasks/test-module.ps1",
103+
"presentation": {
104+
"echo": true,
105+
"reveal": "always",
106+
"focus": true,
107+
"panel": "new",
108+
"showReuseMessage": true,
109+
"clear": false
110+
},
111+
"group": "test",
112+
"dependsOn": [
113+
"Distribute"
114+
]
115+
},
116+
{
117+
"label": "Test: E2E",
118+
"type": "shell",
119+
"command": "./tasks/test-e2e.ps1",
120+
"presentation": {
121+
"echo": true,
122+
"reveal": "always",
123+
"focus": true,
124+
"panel": "new",
125+
"showReuseMessage": true,
126+
"clear": false
127+
},
128+
"group": "test",
129+
"dependsOn": [
130+
"Distribute"
131+
]
132+
}
133+
]
134+
}

docs/AMSoftware.Dataverse.PowerShell.md

Lines changed: 13 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Provision a new language
2424
Relate rows in a many-to-many relationship
2525

2626
### [Add-DataverseRelationship](Add-DataverseRelationship.md)
27-
{{ Fill in the Synopsis }}
27+
Add relationship to Table
2828

2929
### [Add-DataverseRow](Add-DataverseRow.md)
3030
Add a new row to a table
@@ -41,9 +41,15 @@ Add a table key
4141
### [Connect-DataverseEnvironment](Connect-DataverseEnvironment.md)
4242
Connect to a specific Dataverse Environment.
4343

44+
### [Export-DataverseFile](Export-DataverseFile.md)
45+
{{ Fill in the Synopsis }}
46+
4447
### [Export-DataversePluginAssembly](Export-DataversePluginAssembly.md)
4548
{{ Fill in the Synopsis }}
4649

50+
### [Export-DataverseSolution](Export-DataverseSolution.md)
51+
{{ Fill in the Synopsis }}
52+
4753
### [Export-DataverseTranslation](Export-DataverseTranslation.md)
4854
{{ Fill in the Synopsis }}
4955

@@ -92,34 +98,19 @@ Retrieve table key metadata
9298
### [Get-DataverseUser](Get-DataverseUser.md)
9399
{{ Fill in the Synopsis }}
94100

95-
### [Import-DataverseTranslation](Import-DataverseTranslation.md)
96-
{{ Fill in the Synopsis }}
97-
98-
### [Import-DataverseWebResource](Import-DataverseWebResource.md)
99-
{{ Fill in the Synopsis }}
100-
101-
### [Invoke-DataverseWorkflow](Invoke-DataverseWorkflow.md)
102-
103-
104-
### [Publish-DataverseComponent](Publish-DataverseComponent.md)
101+
### [Import-DataverseFile](Import-DataverseFile.md)
105102
{{ Fill in the Synopsis }}
106103

107-
### [Register-DataverseDataProvider](Register-DataverseDataProvider.md)
104+
### [Import-DataverseSolution](Import-DataverseSolution.md)
108105
{{ Fill in the Synopsis }}
109106

110-
### [Register-DataversePlugin](Register-DataversePlugin.md)
111-
{{ Fill in the Synopsis }}
112-
113-
### [Register-DataversePluginStep](Register-DataversePluginStep.md)
107+
### [Import-DataverseTranslation](Import-DataverseTranslation.md)
114108
{{ Fill in the Synopsis }}
115109

116-
### [Register-DataversePluginStepImage](Register-DataversePluginStepImage.md)
117-
{{ Fill in the Synopsis }}
110+
### [Invoke-DataverseWorkflow](Invoke-DataverseWorkflow.md)
118111

119-
### [Register-DataverseServiceEndpoint](Register-DataverseServiceEndpoint.md)
120-
{{ Fill in the Synopsis }}
121112

122-
### [Register-DataverseWebhook](Register-DataverseWebhook.md)
113+
### [Publish-DataverseComponent](Publish-DataverseComponent.md)
123114
{{ Fill in the Synopsis }}
124115

125116
### [Remove-DataverseChoice](Remove-DataverseChoice.md)
@@ -185,28 +176,7 @@ Update a table
185176
### [Submit-DataverseBatch](Submit-DataverseBatch.md)
186177
Submit and execute a batch of requests
187178

188-
### [Test-DataverseSolution](Test-DataverseSolution.md)
189-
{{ Fill in the Synopsis }}
190-
191-
### [Test-DataverseSolutionComponent](Test-DataverseSolutionComponent.md)
192-
{{ Fill in the Synopsis }}
193-
194-
### [Unregister-DataverseDataProvider](Unregister-DataverseDataProvider.md)
195-
{{ Fill in the Synopsis }}
196-
197-
### [Unregister-DataversePlugin](Unregister-DataversePlugin.md)
198-
{{ Fill in the Synopsis }}
199-
200-
### [Unregister-DataversePluginAssembly](Unregister-DataversePluginAssembly.md)
201-
{{ Fill in the Synopsis }}
202-
203-
### [Unregister-DataversePluginStep](Unregister-DataversePluginStep.md)
204-
{{ Fill in the Synopsis }}
205-
206-
### [Unregister-DataversePluginStepImage](Unregister-DataversePluginStepImage.md)
207-
{{ Fill in the Synopsis }}
208-
209-
### [Unregister-DataverseServiceEndpoint](Unregister-DataverseServiceEndpoint.md)
179+
### [Update-DataverseSolution](Update-DataverseSolution.md)
210180
{{ Fill in the Synopsis }}
211181

212182
### [Use-DataverseLanguage](Use-DataverseLanguage.md)

docs/Export-DataverseFile.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
external help file: AMSoftware.Dataverse.PowerShell-help.xml
3+
Module Name: AMSoftware.Dataverse.PowerShell
4+
online version:
5+
schema: 2.0.0
6+
---
7+
8+
# Export-DataverseFile
9+
10+
## SYNOPSIS
11+
Export the content of a File or Image column
12+
13+
## SYNTAX
14+
15+
```
16+
Export-DataverseFile [-Table] <String> [-Row] <Guid> [-Column] <String>
17+
[<CommonParameters>]
18+
```
19+
20+
## DESCRIPTION
21+
Export the content of a File or Image column.
22+
In case of an Image Column this only works when Full Image is enabled, as this stores the full image in File Storage.
23+
For Image Columns the thumbnail is stored as content in the Field.
24+
25+
## EXAMPLES
26+
27+
## PARAMETERS
28+
29+
### -Column
30+
The LogicalName of the File or Image Column
31+
32+
```yaml
33+
Type: System.String
34+
Parameter Sets: (All)
35+
Aliases:
36+
37+
Required: True
38+
Position: 2
39+
Default value: None
40+
Accept pipeline input: False
41+
Accept wildcard characters: False
42+
```
43+
44+
### -Row
45+
The Id of the Row to get the File or Image for
46+
47+
```yaml
48+
Type: System.Guid
49+
Parameter Sets: (All)
50+
Aliases: Id
51+
52+
Required: True
53+
Position: 1
54+
Default value: None
55+
Accept pipeline input: True (ByPropertyName, ByValue)
56+
Accept wildcard characters: False
57+
```
58+
59+
### -Table
60+
The LogicalName of the Table to get the File or Image for
61+
62+
```yaml
63+
Type: System.String
64+
Parameter Sets: (All)
65+
Aliases: LogicalName
66+
67+
Required: True
68+
Position: 0
69+
Default value: None
70+
Accept pipeline input: True (ByPropertyName)
71+
Accept wildcard characters: False
72+
```
73+
74+
### CommonParameters
75+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
76+
77+
## INPUTS
78+
79+
### System.String
80+
81+
### System.Guid
82+
83+
## OUTPUTS
84+
85+
### System.Byte[]
86+
87+
## NOTES
88+
89+
The Function returns the content as a Byte[] which can be saved to disk using Set-Content
90+
91+
## RELATED LINKS
92+
93+
94+
[Online](https://github.com/AMSoftwareNL/DataversePowershell/blob/main/docs/Export-DataverseFile.md)
95+
96+

0 commit comments

Comments
 (0)