Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rds-update-certificate script.ps1 fix issue #12 #13

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions rds-deployment-ha-broker/Scripts/RdcbHaPostConfig.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ param
)

$localhost = [System.Net.Dns]::GetHostByName((hostname)).HostName
$domainNetbios = (Get-ADDomain -Current LocalComputer).NetBIOSName
$domainNetbios = (Get-WmiObject Win32_NTDomain -Filter "DnsForestName = '$((Get-WmiObject Win32_ComputerSystem).Domain)'").DomainName
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a comment on #17: there is no intent to support WS2012,
the two supported versions are WS12R2 and WS16 where this cmdlet is available. so not an issue, and no fix required

$username = $domainNetbios + "\" + $Username
$cred = New-Object System.Management.Automation.PSCredential -ArgumentList @($username,(ConvertTo-SecureString -String $password -AsPlainText -Force))

Expand All @@ -38,7 +38,7 @@ $ConfigData = @{
} # End of Config Data

$Logfile = ".\CB_PostConfig1.1_{0}.log" -f (get-date -Format "yyyyMMddhhmmss")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

funny character

function GetServersByRole($roleName)
{
$RemoteSqlOdbcconn = new-object System.Data.Odbc.OdbcConnection
Expand Down Expand Up @@ -220,10 +220,10 @@ function SetupCB($compName, $clientURL)

Function WriteLog
{
�� Param ([string]$logstring)
�� Add-content $Logfile -value $logstring
�� Write-Host $logstring
�� Param ([string]$logstring)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are these funny characters, what IDE are you using
make sure indentation and spacing consistent with the rest of the file

�� Add-content $Logfile -value $logstring
�� Write-Host $logstring
}

WriteLog("Starting PostConfig on machine $($localhost)")
Expand Down