You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: functions/Initialize-PDCVhdDisk.ps1
+18-7Lines changed: 18 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
functionInitialize-PdcVhdDisk {
1
+
functionInitialize-PDCVhdDisk {
2
2
<#
3
3
.SYNOPSIS
4
-
Initialize-PdcVhdDisk initialized the VHD
4
+
Initialize-PDCVhdDisk initialized the VHD
5
5
6
6
.DESCRIPTION
7
-
Initialize-PdcVhdDisk will initialize the VHD.
7
+
Initialize-PDCVhdDisk will initialize the VHD.
8
8
It mounts the disk, creates a volume, creates the partition and sets it to active
9
9
10
10
.PARAMETERPath
@@ -15,6 +15,17 @@ function Initialize-PdcVhdDisk {
15
15
16
16
$scred = Get-Credential, then pass $scred object to the -Credential parameter.
17
17
18
+
.PARAMETEREnableException
19
+
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
20
+
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
21
+
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
22
+
23
+
.PARAMETERWhatIf
24
+
If this switch is enabled, no actions are performed but informational messages will be displayed that explain what would happen if the command were to run.
25
+
26
+
.PARAMETERConfirm
27
+
If this switch is enabled, you will be prompted for confirmation before executing any operations that change state.
28
+
18
29
.NOTES
19
30
Author: Sander Stad (@sqlstad, sqlstad.nl)
20
31
@@ -26,12 +37,12 @@ function Initialize-PdcVhdDisk {
26
37
https://psdatabaseclone.io/
27
38
28
39
.EXAMPLE
29
-
Initialize-PdcVhdDisk -Path $path
40
+
Initialize-PDCVhdDisk -Path $path
30
41
31
42
Initialize the disk pointing to the path with all default settings
Copy file name to clipboardExpand all lines: functions/Invoke-PDCRepairClone.ps1
+27-13Lines changed: 27 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
functionInvoke-PdcRepairClone {
1
+
functionInvoke-PDCRepairClone {
2
2
<#
3
3
.SYNOPSIS
4
-
Invoke-PdcRepairClone repairs the clones
4
+
Invoke-PDCRepairClone repairs the clones
5
5
6
6
.DESCRIPTION
7
-
Invoke-PdcRepairClone has the ability to repair the clones when they have gotten disconnected from the image.
7
+
Invoke-PDCRepairClone has the ability to repair the clones when they have gotten disconnected from the image.
8
8
In such a case the clone is no longer available for the database server and the database will either not show
9
9
any information or the database will have the status (Recovery Pending).
10
10
@@ -21,6 +21,17 @@ function Invoke-PdcRepairClone {
21
21
Windows Authentication will be used if SqlCredential is not specified. SQL Server does not accept Windows credentials being passed as credentials.
22
22
To connect as a different Windows user, run PowerShell as that user.
23
23
24
+
.PARAMETEREnableException
25
+
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
26
+
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
27
+
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
28
+
29
+
.PARAMETERWhatIf
30
+
If this switch is enabled, no actions are performed but informational messages will be displayed that explain what would happen if the command were to run.
31
+
32
+
.PARAMETERConfirm
33
+
If this switch is enabled, you will be prompted for confirmation before executing any operations that change state.
34
+
24
35
.NOTES
25
36
Author: Sander Stad (@sqlstad, sqlstad.nl)
26
37
@@ -32,7 +43,7 @@ function Invoke-PdcRepairClone {
32
43
https://psdatabaseclone.io/
33
44
34
45
.EXAMPLE
35
-
Invoke-PdcRepairClone -Hostname Host1
46
+
Invoke-PDCRepairClone -Hostname Host1
36
47
37
48
Repair the clones for Host1
38
49
@@ -42,20 +53,23 @@ function Invoke-PdcRepairClone {
0 commit comments