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
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -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
@@ -46,7 +57,8 @@ function Initialize-PDCVhdDisk {
Copy file name to clipboardExpand all lines: functions/Invoke-PDCRepairClone.ps1
+15-4Lines changed: 15 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -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
@@ -42,9 +53,9 @@ function Invoke-PDCRepairClone {
42
53
param(
43
54
[Parameter(Mandatory=$true)]
44
55
[string[]]$HostName,
45
-
46
56
[System.Management.Automation.PSCredential]
47
-
$SqlCredential
57
+
$SqlCredential,
58
+
[switch]$EnableException
48
59
)
49
60
50
61
begin {
@@ -87,10 +98,10 @@ function Invoke-PDCRepairClone {
87
98
# Get the clones registered for the host
88
99
try {
89
100
Write-PSFMessage-Message "Get the clones for host $hst"-Level Verbose
Copy file name to clipboardExpand all lines: functions/New-PDCImage.ps1
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,17 @@ function New-PDCImage {
57
57
.PARAMETERForce
58
58
Forcefully execute commands when needed
59
59
60
+
.PARAMETEREnableException
61
+
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
62
+
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
63
+
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
64
+
65
+
.PARAMETERWhatIf
66
+
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.
67
+
68
+
.PARAMETERConfirm
69
+
If this switch is enabled, you will be prompted for confirmation before executing any operations that change state.
Copy file name to clipboardExpand all lines: functions/New-PDCVhdDisk.ps1
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,17 @@ function New-PDCVhdDisk {
28
28
.PARAMETERForce
29
29
Forcefully create the neccesary items
30
30
31
+
.PARAMETEREnableException
32
+
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
33
+
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
34
+
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
35
+
36
+
.PARAMETERWhatIf
37
+
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.
38
+
39
+
.PARAMETERConfirm
40
+
If this switch is enabled, you will be prompted for confirmation before executing any operations that change state.
Copy file name to clipboardExpand all lines: functions/Remove-PDCClone.ps1
+13-7Lines changed: 13 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,17 @@ function Remove-PDCClone {
34
34
.PARAMETERExcludeDatabase
35
35
Allows to filter to exclude specific databases
36
36
37
+
.PARAMETEREnableException
38
+
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
39
+
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
40
+
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
41
+
42
+
.PARAMETERWhatIf
43
+
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.
44
+
45
+
.PARAMETERConfirm
46
+
If this switch is enabled, you will be prompted for confirmation before executing any operations that change state.
Copy file name to clipboardExpand all lines: functions/Set-PDCConfiguration.ps1
+12-3Lines changed: 12 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,16 @@ function Set-PDCConfiguration {
27
27
.PARAMETERDatabase
28
28
Database to use to save all the information in
29
29
30
+
.PARAMETEREnableException
31
+
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
32
+
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
33
+
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
34
+
35
+
.PARAMETERWhatIf
36
+
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.
37
+
38
+
.PARAMETERConfirm
39
+
If this switch is enabled, you will be prompted for confirmation before executing any operations that change state.
30
40
31
41
.NOTES
32
42
Author: Sander Stad (@sqlstad, sqlstad.nl)
@@ -49,11 +59,10 @@ function Set-PDCConfiguration {
Copy file name to clipboardExpand all lines: internal/functions/Convert-PDCLocalUncPathToLocalPath.ps1
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,17 @@ function Convert-PDCLocalUncPathToLocalPath {
10
10
.PARAMETERUncPath
11
11
UNC path to convert to local path
12
12
13
+
.PARAMETEREnableException
14
+
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
15
+
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
16
+
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
17
+
18
+
.PARAMETERWhatIf
19
+
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.
20
+
21
+
.PARAMETERConfirm
22
+
If this switch is enabled, you will be prompted for confirmation before executing any operations that change state.
23
+
13
24
.NOTES
14
25
Author: Sander Stad (@sqlstad, sqlstad.nl)
15
26
@@ -28,7 +39,8 @@ function Convert-PDCLocalUncPathToLocalPath {
0 commit comments