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
Show file tree
Hide file tree
Changes from all commits
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")
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)
�� Add-content $Logfile -value $logstring
�� Write-Host $logstring
}

WriteLog("Starting PostConfig on machine $($localhost)")
Expand Down
4 changes: 2 additions & 2 deletions rds-update-certificate/Scripts/Script.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ param(
# requires WMF 5.0

# verify NuGet package
$nuget = get-packageprovider nuget
$nuget = get-packageprovider nuget -Force
if (-not $nuget -or ($nuget.Version -lt 2.8.5.22))
{
log "installing nuget package..."
Expand All @@ -47,7 +47,7 @@ param(

# install AzureRM module
#
if (-not (get-module AzureRM))
if (-not (get-module AzureRM*))
{
log "installing AzureRm powershell module..."
install-module AzureRM -force
Expand Down