Skip to content

Commit b329fb0

Browse files
committed
Fix encoding
1 parent 4b2cdd6 commit b329fb0

2 files changed

Lines changed: 48 additions & 48 deletions

File tree

functions/Get-PDCImage.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function Get-PDCImage {
1+
function Get-PDCImage {
22
<#
33
.SYNOPSIS
44
Get-PDCImage get on or more clones
@@ -119,4 +119,4 @@ function Get-PDCImage {
119119

120120
Write-PSFMessage -Message "Finished retrieving image(s)" -Level Verbose
121121
}
122-
}
122+
}

functions/Invoke-PDCRepairClone.ps1

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
function Invoke-PDCRepairClone {
2-
<#
3-
.SYNOPSIS
4-
Invoke-PDCRepairClone repairs the clones
2+
<#
3+
.SYNOPSIS
4+
Invoke-PDCRepairClone repairs the clones
55
6-
.DESCRIPTION
7-
Invoke-PDCRepairClone has the ability to repair the clones when they have gotten disconnected from the image.
8-
In such a case the clone is no longer available for the database server and the database will either not show
9-
any information or the database will have the status (Recovery Pending).
6+
.DESCRIPTION
7+
Invoke-PDCRepairClone has the ability to repair the clones when they have gotten disconnected from the image.
8+
In such a case the clone is no longer available for the database server and the database will either not show
9+
any information or the database will have the status (Recovery Pending).
1010
11-
By running this command all the clones will be retrieved from the database for a certain host.
11+
By running this command all the clones will be retrieved from the database for a certain host.
1212
13-
.PARAMETER HostName
14-
Set on or more hostnames to retrieve the configurations for
13+
.PARAMETER HostName
14+
Set on or more hostnames to retrieve the configurations for
1515
16-
.PARAMETER SqlCredential
17-
Allows you to login to servers using SQL Logins as opposed to Windows Auth/Integrated/Trusted. To use:
16+
.PARAMETER SqlCredential
17+
Allows you to login to servers using SQL Logins as opposed to Windows Auth/Integrated/Trusted. To use:
1818
19-
$scred = Get-Credential, then pass $scred object to the -SqlCredential parameter.
19+
$scred = Get-Credential, then pass $scred object to the -SqlCredential parameter.
2020
21-
Windows Authentication will be used if SqlCredential is not specified. SQL Server does not accept Windows credentials being passed as credentials.
22-
To connect as a different Windows user, run PowerShell as that user.
21+
Windows Authentication will be used if SqlCredential is not specified. SQL Server does not accept Windows credentials being passed as credentials.
22+
To connect as a different Windows user, run PowerShell as that user.
2323
24-
.PARAMETER EnableException
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.
24+
.PARAMETER EnableException
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.
2828
29-
.PARAMETER WhatIf
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.
29+
.PARAMETER WhatIf
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.
3131
32-
.PARAMETER Confirm
33-
If this switch is enabled, you will be prompted for confirmation before executing any operations that change state.
32+
.PARAMETER Confirm
33+
If this switch is enabled, you will be prompted for confirmation before executing any operations that change state.
3434
35-
.NOTES
36-
Author: Sander Stad (@sqlstad, sqlstad.nl)
35+
.NOTES
36+
Author: Sander Stad (@sqlstad, sqlstad.nl)
3737
38-
Website: https://psdatabaseclone.io
39-
Copyright: (C) Sander Stad, sander@sqlstad.nl
40-
License: MIT https://opensource.org/licenses/MIT
38+
Website: https://psdatabaseclone.io
39+
Copyright: (C) Sander Stad, sander@sqlstad.nl
40+
License: MIT https://opensource.org/licenses/MIT
4141
42-
.LINK
43-
https://psdatabaseclone.io/
42+
.LINK
43+
https://psdatabaseclone.io/
4444
45-
.EXAMPLE
46-
Invoke-PDCRepairClone -Hostname Host1
45+
.EXAMPLE
46+
Invoke-PDCRepairClone -Hostname Host1
4747
48-
Repair the clones for Host1
48+
Repair the clones for Host1
4949
50-
#>
50+
#>
5151
[CmdLetBinding()]
5252

5353
param(
@@ -80,18 +80,18 @@
8080
foreach ($hst in $HostName) {
8181

8282
$query = "
83-
SELECT i.ImageLocation,
84-
c.CloneLocation,
85-
c.SqlInstance,
86-
c.DatabaseName,
87-
c.IsEnabled
88-
FROM dbo.Clone AS c
89-
INNER JOIN dbo.Image AS i
90-
ON i.ImageID = c.ImageID
91-
INNER JOIN dbo.Host AS h
92-
ON h.HostID = c.HostID
93-
WHERE h.HostName = '$hst';
94-
"
83+
SELECT i.ImageLocation,
84+
c.CloneLocation,
85+
c.SqlInstance,
86+
c.DatabaseName,
87+
c.IsEnabled
88+
FROM dbo.Clone AS c
89+
INNER JOIN dbo.Image AS i
90+
ON i.ImageID = c.ImageID
91+
INNER JOIN dbo.Host AS h
92+
ON h.HostID = c.HostID
93+
WHERE h.HostName = '$hst';
94+
"
9595

9696
Write-PSFMessage -Message "Query Host Clones`n$query" -Level Debug
9797

0 commit comments

Comments
 (0)