Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

Commit 3f312d9

Browse files
authored
Release fix for Copy-DSCPullServerAdmin (#42)
!Deploy * fix Copy-DSCPullServerAdminData reports using all switch instead of top (#41)
1 parent 409dccf commit 3f312d9

21 files changed

+388
-122
lines changed

DSCPullServerAdmin/DSCPullServerAdmin.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ PrivateData = @{
126126
# IconUri = ''
127127

128128
# ReleaseNotes of this module
129-
ReleaseNotes = 'Implemented full EDB support (experimental): Set, Remove and New Device, Registration and StatusReport.'
129+
ReleaseNotes = 'Fix where Copy-DSCPullServerAdmin would only copy 5 StatusReports. Now copies all'
130130

131131
} # End of PSData hashtable
132132

DSCPullServerAdmin/docs/Copy-DSCPullServerAdminDataESEToSQL.md renamed to DSCPullServerAdmin/docs/Copy-DSCPullServerAdminData.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@ online version:
55
schema: 2.0.0
66
---
77

8-
# Copy-DSCPullServerAdminDataESEToSQL
8+
# Copy-DSCPullServerAdminData
99

1010
## SYNOPSIS
11-
Copy data from EDB to SQL.
11+
Copy data between 2 Database connections
1212

1313
## SYNTAX
1414

1515
```
16-
Copy-DSCPullServerAdminDataESEToSQL [-ESEConnection] <DSCPullServerESEConnection>
17-
[-SQLConnection] <DSCPullServerSQLConnection> [-ObjectsToMigrate] <String[]> [-Force] [-WhatIf] [-Confirm]
18-
[<CommonParameters>]
16+
Copy-DSCPullServerAdminData [-Connection1] <DSCPullServerConnection> [-Connection2] <DSCPullServerConnection>
17+
[-ObjectsToMigrate] <String[]> [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
1918
```
2019

2120
## DESCRIPTION
2221
This function allows for data to be copied over from
23-
an ESE (edb) connection to a SQL connection.
22+
a connection to another connection.
2423
This allows
25-
a user to migrate over from an ESENT type Pull Server to
26-
a SQL type Pull Server without loosing data.
24+
a user to migrate over data from an ESENT type Pull Server to
25+
a SQL type Pull Server, SQL to SQL type Pull Server, SQL to ESENT type
26+
Pull Server and ESENT to ESENT Type Pull Server without loosing data.
2727

2828
## EXAMPLES
2929

@@ -32,17 +32,17 @@ a SQL type Pull Server without loosing data.
3232
$eseConnection = New-DSCPullServerAdminConnection -ESEFilePath C:\EDB\Devices.edb
3333
```
3434

35-
$sqlConnection = New-DSCPullServerAdminSQLDatabase -SQLServer sqlserver\instance -Name dsc -Credential sa
35+
$sqlConnection = New-DSCPullServerAdminConnection -SQLServer sqlserver\instance -Database dsc -Credential sa
3636

37-
Copy-DSCPullServerAdminDataESEToSQL -ObjectsToMigrate Devices, RegistrationData, StatusReports -Force
37+
Copy-DSCPullServerAdminData -ObjectsToMigrate Devices, RegistrationData, StatusReports -Connection1 $eseConnection -Connection2 $sqlConnection -Force
3838

3939
## PARAMETERS
4040

41-
### -ESEConnection
42-
A specifically passed in ESE connection to migrate data out of.
41+
### -Connection1
42+
A specifically passed in Connection to migrate data out of.
4343

4444
```yaml
45-
Type: DSCPullServerESEConnection
45+
Type: DSCPullServerConnection
4646
Parameter Sets: (All)
4747
Aliases:
4848

@@ -53,11 +53,11 @@ Accept pipeline input: False
5353
Accept wildcard characters: False
5454
```
5555
56-
### -SQLConnection
57-
A specifically passed in SQL connection to migrate data in to.
56+
### -Connection2
57+
A specifically passed in Connection to migrate data in to.
5858
5959
```yaml
60-
Type: DSCPullServerSQLConnection
60+
Type: DSCPullServerConnection
6161
Parameter Sets: (All)
6262
Aliases:
6363

@@ -79,13 +79,13 @@ Aliases:
7979

8080
Required: True
8181
Position: 3
82-
Default value: @('Devices', 'RegistrationData')
82+
Default value: None
8383
Accept pipeline input: False
8484
Accept wildcard characters: False
8585
```
8686
8787
### -Force
88-
When specified, existing records in SQL will be overwritten.
88+
When specified, existing records in the target database will be overwritten.
8989
When not specified
9090
existing data will not be overwritten and Warnings will be provided to inform
9191
the user.
@@ -134,7 +134,8 @@ Accept wildcard characters: False
134134
```
135135
136136
### CommonParameters
137-
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).
137+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
138+
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
138139
139140
## INPUTS
140141

DSCPullServerAdmin/docs/Get-DSCPullServerAdminConnection.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ Accept wildcard characters: False
8787
```
8888
8989
### CommonParameters
90-
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).
90+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
91+
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
9192
9293
## INPUTS
9394

DSCPullServerAdmin/docs/Get-DSCPullServerAdminDevice.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ Accept wildcard characters: False
159159
```
160160
161161
### CommonParameters
162-
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).
162+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
163+
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
163164
164165
## INPUTS
165166

DSCPullServerAdmin/docs/Get-DSCPullServerAdminRegistration.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ Accept wildcard characters: False
154154
```
155155
156156
### CommonParameters
157-
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).
157+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
158+
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
158159
159160
## INPUTS
160161

DSCPullServerAdmin/docs/Get-DSCPullServerAdminStatusReport.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ Accept wildcard characters: False
125125
126126
### -All
127127
Return all reports that correspond to specified filters (overwrites Top parameter).
128-
SQL Only.```yaml
128+
SQL Only.
129+
130+
```yaml
129131
Type: SwitchParameter
130132
Parameter Sets: (All)
131133
Aliases:
@@ -139,7 +141,9 @@ Accept wildcard characters: False
139141
140142
### -Top
141143
Return number of reports that correspond to specified filters.
142-
SQL Only.```yaml
144+
SQL Only.
145+
146+
```yaml
143147
Type: UInt16
144148
Parameter Sets: (All)
145149
Aliases:
@@ -152,7 +156,7 @@ Accept wildcard characters: False
152156
```
153157
154158
### -OperationType
155-
{{Fill OperationType Description}}
159+
Return the reports which have the specified OperationType.
156160
157161
```yaml
158162
Type: String
@@ -245,7 +249,8 @@ Accept wildcard characters: False
245249
```
246250
247251
### CommonParameters
248-
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).
252+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
253+
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
249254
250255
## INPUTS
251256

DSCPullServerAdmin/docs/New-DSCPullServerAdminConnection.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ Accept wildcard characters: False
128128
```
129129
130130
### CommonParameters
131-
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).
131+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
132+
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
132133
133134
## INPUTS
134135

DSCPullServerAdmin/docs/New-DSCPullServerAdminDevice.md

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@ Create device entries (LCMv1) in a Pull Server Database.
1717
New-DSCPullServerAdminDevice -ConfigurationID <Guid> -TargetName <String> [-ServerCheckSum <String>]
1818
[-TargetCheckSum <String>] [-NodeCompliant <Boolean>] [-LastComplianceTime <DateTime>]
1919
[-LastHeartbeatTime <DateTime>] [-Dirty <Boolean>] [-StatusCode <UInt32>]
20-
[-Connection <DSCPullServerSQLConnection>] [-WhatIf] [-Confirm] [<CommonParameters>]
20+
[-Connection <DSCPullServerConnection>] [-WhatIf] [-Confirm] [<CommonParameters>]
21+
```
22+
23+
### ESE
24+
```
25+
New-DSCPullServerAdminDevice -ConfigurationID <Guid> -TargetName <String> [-ServerCheckSum <String>]
26+
[-TargetCheckSum <String>] [-NodeCompliant <Boolean>] [-LastComplianceTime <DateTime>]
27+
[-LastHeartbeatTime <DateTime>] [-Dirty <Boolean>] [-StatusCode <UInt32>] -ESEFilePath <String> [-WhatIf]
28+
[-Confirm] [<CommonParameters>]
2129
```
2230

2331
### SQL
@@ -54,7 +62,7 @@ Aliases:
5462
Required: True
5563
Position: Named
5664
Default value: None
57-
Accept pipeline input: False
65+
Accept pipeline input: True (ByPropertyName)
5866
Accept wildcard characters: False
5967
```
6068
@@ -69,7 +77,7 @@ Aliases:
6977
Required: True
7078
Position: Named
7179
Default value: None
72-
Accept pipeline input: False
80+
Accept pipeline input: True (ByPropertyName)
7381
Accept wildcard characters: False
7482
```
7583
@@ -84,7 +92,7 @@ Aliases:
8492
Required: False
8593
Position: Named
8694
Default value: None
87-
Accept pipeline input: False
95+
Accept pipeline input: True (ByPropertyName)
8896
Accept wildcard characters: False
8997
```
9098
@@ -99,7 +107,7 @@ Aliases:
99107
Required: False
100108
Position: Named
101109
Default value: None
102-
Accept pipeline input: False
110+
Accept pipeline input: True (ByPropertyName)
103111
Accept wildcard characters: False
104112
```
105113
@@ -114,7 +122,7 @@ Aliases:
114122
Required: False
115123
Position: Named
116124
Default value: False
117-
Accept pipeline input: False
125+
Accept pipeline input: True (ByPropertyName)
118126
Accept wildcard characters: False
119127
```
120128
@@ -129,7 +137,7 @@ Aliases:
129137
Required: False
130138
Position: Named
131139
Default value: None
132-
Accept pipeline input: False
140+
Accept pipeline input: True (ByPropertyName)
133141
Accept wildcard characters: False
134142
```
135143
@@ -144,7 +152,7 @@ Aliases:
144152
Required: False
145153
Position: Named
146154
Default value: None
147-
Accept pipeline input: False
155+
Accept pipeline input: True (ByPropertyName)
148156
Accept wildcard characters: False
149157
```
150158
@@ -159,7 +167,7 @@ Aliases:
159167
Required: False
160168
Position: Named
161169
Default value: False
162-
Accept pipeline input: False
170+
Accept pipeline input: True (ByPropertyName)
163171
Accept wildcard characters: False
164172
```
165173
@@ -174,7 +182,7 @@ Aliases:
174182
Required: False
175183
Position: Named
176184
Default value: 0
177-
Accept pipeline input: False
185+
Accept pipeline input: True (ByPropertyName)
178186
Accept wildcard characters: False
179187
```
180188
@@ -185,13 +193,28 @@ unless one off the parameters for ad-hoc connections (ESEFilePath, SQLServer)
185193
is used in which case, an ad-hoc connection is created.
186194
187195
```yaml
188-
Type: DSCPullServerSQLConnection
196+
Type: DSCPullServerConnection
189197
Parameter Sets: Connection
190198
Aliases:
191199

192200
Required: False
193201
Position: Named
194-
Default value: (Get-DSCPullServerAdminConnection -OnlyShowActive -Type SQL)
202+
Default value: (Get-DSCPullServerAdminConnection -OnlyShowActive)
203+
Accept pipeline input: False
204+
Accept wildcard characters: False
205+
```
206+
207+
### -ESEFilePath
208+
Define the EDB file path to use an ad-hoc ESE connection.
209+
210+
```yaml
211+
Type: String
212+
Parameter Sets: ESE
213+
Aliases:
214+
215+
Required: True
216+
Position: Named
217+
Default value: None
195218
Accept pipeline input: False
196219
Accept wildcard characters: False
197220
```
@@ -273,7 +296,8 @@ Accept wildcard characters: False
273296
```
274297
275298
### CommonParameters
276-
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).
299+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
300+
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
277301
278302
## INPUTS
279303

0 commit comments

Comments
 (0)