Skip to content

Commit a733cd9

Browse files
committed
Formatted help
1 parent 30f8a83 commit a733cd9

11 files changed

Lines changed: 426 additions & 426 deletions

functions/Get-PSDCClone.ps1

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
11
function Get-PSDCClone {
22
<#
3-
.SYNOPSIS
4-
Get-PSDCClone get on or more clones
3+
.SYNOPSIS
4+
Get-PSDCClone get on or more clones
55
6-
.DESCRIPTION
7-
Get-PSDCClone will retrieve the clones and apply filters if needed.
8-
By default all the clones are returned
6+
.DESCRIPTION
7+
Get-PSDCClone will retrieve the clones and apply filters if needed.
8+
By default all the clones are returned
99
10-
.PARAMETER SqlCredential
11-
Allows you to login to servers using SQL Logins as opposed to Windows Auth/Integrated/Trusted. To use:
10+
.PARAMETER SqlCredential
11+
Allows you to login to servers using SQL Logins as opposed to Windows Auth/Integrated/Trusted. To use:
1212
13-
$scred = Get-Credential, then pass $scred object to the -SqlCredential parameter.
13+
$scred = Get-Credential, then pass $scred object to the -SqlCredential parameter.
1414
15-
Windows Authentication will be used if SqlCredential is not specified. SQL Server does not accept Windows credentials being passed as credentials.
16-
To connect as a different Windows user, run PowerShell as that user.
15+
Windows Authentication will be used if SqlCredential is not specified. SQL Server does not accept Windows credentials being passed as credentials.
16+
To connect as a different Windows user, run PowerShell as that user.
1717
18-
.PARAMETER HostName
19-
Filter based on the hostname
18+
.PARAMETER HostName
19+
Filter based on the hostname
2020
21-
.PARAMETER Database
22-
Filter based on the database
21+
.PARAMETER Database
22+
Filter based on the database
2323
24-
.PARAMETER ImageID
25-
Filter based on the image id
24+
.PARAMETER ImageID
25+
Filter based on the image id
2626
27-
.PARAMETER ImageName
28-
Filter based on the image name
27+
.PARAMETER ImageName
28+
Filter based on the image name
2929
30-
.PARAMETER ImageLocation
31-
Filter based on the image location
30+
.PARAMETER ImageLocation
31+
Filter based on the image location
3232
33-
.NOTES
34-
Author: Sander Stad (@sqlstad, sqlstad.nl)
33+
.NOTES
34+
Author: Sander Stad (@sqlstad, sqlstad.nl)
3535
36-
Website: https://psdatabaseclone.io
37-
Copyright: (C) Sander Stad, sander@sqlstad.nl
38-
License: MIT https://opensource.org/licenses/MIT
36+
Website: https://psdatabaseclone.io
37+
Copyright: (C) Sander Stad, sander@sqlstad.nl
38+
License: MIT https://opensource.org/licenses/MIT
3939
40-
.LINK
41-
https://psdatabaseclone.io/
40+
.LINK
41+
https://psdatabaseclone.io/
4242
43-
.EXAMPLE
44-
Get-PSDCClone -HostName host1, host2
43+
.EXAMPLE
44+
Get-PSDCClone -HostName host1, host2
4545
46-
Retrieve the clones for host1 and host2
46+
Retrieve the clones for host1 and host2
4747
48-
.EXAMPLE
49-
Get-PSDCClone -Database DB1
48+
.EXAMPLE
49+
Get-PSDCClone -Database DB1
5050
51-
Get all the clones that have the name DB1
51+
Get all the clones that have the name DB1
5252
53-
.EXAMPLE
54-
Get-PSDCClone -ImageName DB1_20180703085917
53+
.EXAMPLE
54+
Get-PSDCClone -ImageName DB1_20180703085917
5555
56-
Get all the clones that were made with image "DB1_20180703085917"
57-
#>
56+
Get all the clones that were made with image "DB1_20180703085917"
57+
#>
5858

5959
[CmdLetBinding()]
6060

functions/Get-PSDCImage.ps1

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
11
function Get-PSDCImage {
2-
<#
3-
.SYNOPSIS
4-
Get-PSDCImage get on or more clones
2+
<#
3+
.SYNOPSIS
4+
Get-PSDCImage get on or more clones
55
6-
.DESCRIPTION
7-
Get-PSDCImage will retrieve the clones and apply filters if needed.
8-
By default all the clones are returned
6+
.DESCRIPTION
7+
Get-PSDCImage will retrieve the clones and apply filters if needed.
8+
By default all the clones are returned
99
10-
.PARAMETER SqlCredential
11-
Allows you to login to servers using SQL Logins as opposed to Windows Auth/Integrated/Trusted. To use:
10+
.PARAMETER SqlCredential
11+
Allows you to login to servers using SQL Logins as opposed to Windows Auth/Integrated/Trusted. To use:
1212
13-
$scred = Get-Credential, then pass $scred object to the -SqlCredential parameter.
13+
$scred = Get-Credential, then pass $scred object to the -SqlCredential parameter.
1414
15-
Windows Authentication will be used if SqlCredential is not specified. SQL Server does not accept Windows credentials being passed as credentials.
16-
To connect as a different Windows user, run PowerShell as that user.
15+
Windows Authentication will be used if SqlCredential is not specified. SQL Server does not accept Windows credentials being passed as credentials.
16+
To connect as a different Windows user, run PowerShell as that user.
1717
18-
.PARAMETER ImageID
19-
Filter based on the image id
18+
.PARAMETER ImageID
19+
Filter based on the image id
2020
21-
.PARAMETER ImageName
22-
Filter based on the image name
21+
.PARAMETER ImageName
22+
Filter based on the image name
2323
24-
.PARAMETER ImageLocation
25-
Filter based on the image location
24+
.PARAMETER ImageLocation
25+
Filter based on the image location
2626
27-
.PARAMETER Database
28-
Filter based on the database
27+
.PARAMETER Database
28+
Filter based on the database
2929
30-
.NOTES
31-
Author: Sander Stad (@sqlstad, sqlstad.nl)
30+
.NOTES
31+
Author: Sander Stad (@sqlstad, sqlstad.nl)
3232
33-
Website: https://psdatabaseclone.io
34-
Copyright: (C) Sander Stad, sander@sqlstad.nl
35-
License: MIT https://opensource.org/licenses/MIT
33+
Website: https://psdatabaseclone.io
34+
Copyright: (C) Sander Stad, sander@sqlstad.nl
35+
License: MIT https://opensource.org/licenses/MIT
3636
37-
.LINK
38-
https://psdatabaseclone.io/
37+
.LINK
38+
https://psdatabaseclone.io/
3939
40-
.EXAMPLE
41-
Get-PSDCImage -ImageName DB1_20180704220944, DB2_20180704221144
40+
.EXAMPLE
41+
Get-PSDCImage -ImageName DB1_20180704220944, DB2_20180704221144
4242
43-
Retrieve the images for DB1_20180704220944, DB2_20180704221144
43+
Retrieve the images for DB1_20180704220944, DB2_20180704221144
4444
45-
.EXAMPLE
46-
Get-PSDCImage -ImageLocation "\\fileserver1\psdatabaseclone\images\DB1_20180704220944.vhdx"
45+
.EXAMPLE
46+
Get-PSDCImage -ImageLocation "\\fileserver1\psdatabaseclone\images\DB1_20180704220944.vhdx"
4747
48-
Get all the images that are the same as the image location
48+
Get all the images that are the same as the image location
4949
50-
.EXAMPLE
51-
Get-PSDCImage -Database DB1, DB2
50+
.EXAMPLE
51+
Get-PSDCImage -Database DB1, DB2
5252
53-
Get all the images that were made for databases DB1 and DB2
54-
#>
53+
Get all the images that were made for databases DB1 and DB2
54+
#>
5555

5656
[CmdLetBinding()]
5757

functions/Invoke-PSDCRepairClone.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
Repair the clones for Host1
4949
5050
#>
51+
5152
[CmdLetBinding()]
5253

5354
param(

functions/New-PSDCClone.ps1

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,86 @@
11
function New-PSDCClone {
22
<#
3-
.SYNOPSIS
4-
New-PSDCClone creates a new clone
3+
.SYNOPSIS
4+
New-PSDCClone creates a new clone
55
6-
.DESCRIPTION
7-
New-PSDCClone willcreate a new clone based on an image.
8-
The clone will be created in a certain directory, mounted and attached to a database server.
6+
.DESCRIPTION
7+
New-PSDCClone willcreate a new clone based on an image.
8+
The clone will be created in a certain directory, mounted and attached to a database server.
99
10-
.PARAMETER SqlInstance
11-
SQL Server name or SMO object representing the SQL Server to connect to
10+
.PARAMETER SqlInstance
11+
SQL Server name or SMO object representing the SQL Server to connect to
1212
13-
.PARAMETER SqlCredential
14-
Allows you to login to servers using SQL Logins as opposed to Windows Auth/Integrated/Trusted. To use:
13+
.PARAMETER SqlCredential
14+
Allows you to login to servers using SQL Logins as opposed to Windows Auth/Integrated/Trusted. To use:
1515
16-
$scred = Get-Credential, then pass $scred object to the -SqlCredential parameter.
16+
$scred = Get-Credential, then pass $scred object to the -SqlCredential parameter.
1717
18-
Windows Authentication will be used if SqlCredential is not specified. SQL Server does not accept Windows credentials being passed as credentials.
19-
To connect as a different Windows user, run PowerShell as that user.
18+
Windows Authentication will be used if SqlCredential is not specified. SQL Server does not accept Windows credentials being passed as credentials.
19+
To connect as a different Windows user, run PowerShell as that user.
2020
21-
.PARAMETER Credential
22-
Allows you to login to servers using Windows Auth/Integrated/Trusted. To use:
21+
.PARAMETER Credential
22+
Allows you to login to servers using Windows Auth/Integrated/Trusted. To use:
2323
24-
$scred = Get-Credential, then pass $scred object to the -Credential parameter.
24+
$scred = Get-Credential, then pass $scred object to the -Credential parameter.
2525
26-
.PARAMETER ParentVhd
27-
Points to the parent VHD to create the clone from
26+
.PARAMETER ParentVhd
27+
Points to the parent VHD to create the clone from
2828
29-
.PARAMETER Destination
30-
Destination directory to save the clone to
29+
.PARAMETER Destination
30+
Destination directory to save the clone to
3131
32-
.PARAMETER CloneName
33-
Name of the clone
32+
.PARAMETER CloneName
33+
Name of the clone
3434
35-
.PARAMETER Database
36-
Database name for the clone
35+
.PARAMETER Database
36+
Database name for the clone
3737
38-
.PARAMETER LatestImage
39-
Automatically get the last image ever created for an specific database
38+
.PARAMETER LatestImage
39+
Automatically get the last image ever created for an specific database
4040
41-
.PARAMETER Disabled
42-
Registers the clone in the configuration as disabled.
43-
If this setting is used the clone will not be recovered when the repair command is run
41+
.PARAMETER Disabled
42+
Registers the clone in the configuration as disabled.
43+
If this setting is used the clone will not be recovered when the repair command is run
4444
45-
.PARAMETER Force
46-
Forcefully create items when needed
45+
.PARAMETER Force
46+
Forcefully create items when needed
4747
48-
.PARAMETER EnableException
49-
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
50-
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
51-
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
48+
.PARAMETER EnableException
49+
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
50+
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
51+
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
5252
53-
.PARAMETER WhatIf
54-
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.
53+
.PARAMETER WhatIf
54+
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.
5555
56-
.PARAMETER Confirm
57-
If this switch is enabled, you will be prompted for confirmation before executing any operations that change state.
56+
.PARAMETER Confirm
57+
If this switch is enabled, you will be prompted for confirmation before executing any operations that change state.
5858
59-
.NOTES
60-
Author: Sander Stad (@sqlstad, sqlstad.nl)
59+
.NOTES
60+
Author: Sander Stad (@sqlstad, sqlstad.nl)
6161
62-
Website: https://psdatabaseclone.io
63-
Copyright: (C) Sander Stad, sander@sqlstad.nl
64-
License: MIT https://opensource.org/licenses/MIT
62+
Website: https://psdatabaseclone.io
63+
Copyright: (C) Sander Stad, sander@sqlstad.nl
64+
License: MIT https://opensource.org/licenses/MIT
6565
66-
.LINK
67-
https://psdatabaseclone.io/
66+
.LINK
67+
https://psdatabaseclone.io/
6868
69-
.EXAMPLE
70-
New-PSDCClone -SqlInstance SQLDB1 -ParentVhd C:\Temp\images\DB1_20180623203204.vhdx -Destination C:\Temp\clones\ -CloneName DB1_Clone1
69+
.EXAMPLE
70+
New-PSDCClone -SqlInstance SQLDB1 -ParentVhd C:\Temp\images\DB1_20180623203204.vhdx -Destination C:\Temp\clones\ -CloneName DB1_Clone1
7171
72-
Create a new clone based on the image DB1_20180623203204.vhdx and attach the database to SQLDB1 as DB1_Clone1
72+
Create a new clone based on the image DB1_20180623203204.vhdx and attach the database to SQLDB1 as DB1_Clone1
7373
74-
.EXAMPLE
75-
New-PSDCClone -SqlInstance SQLDB1 -Database DB1, DB2 -LatestImage
74+
.EXAMPLE
75+
New-PSDCClone -SqlInstance SQLDB1 -Database DB1, DB2 -LatestImage
7676
77-
Create a new clone on SQLDB1 for the databases DB1 and DB2 with the latest image for those databases
77+
Create a new clone on SQLDB1 for the databases DB1 and DB2 with the latest image for those databases
7878
79-
.EXAMPLE
80-
New-PSDCClone -SqlInstance SQLDB1, SQLDB2 -Database DB1 -LatestImage
79+
.EXAMPLE
80+
New-PSDCClone -SqlInstance SQLDB1, SQLDB2 -Database DB1 -LatestImage
8181
82-
Create a new clone on SQLDB1 and SQLDB2 for the databases DB1 with the latest image
83-
#>
82+
Create a new clone on SQLDB1 and SQLDB2 for the databases DB1 with the latest image
83+
#>
8484
[CmdLetBinding(DefaultParameterSetName = 'ByLatest', SupportsShouldProcess = $true)]
8585
param(
8686
[parameter(Mandatory = $true)]

0 commit comments

Comments
 (0)