-
Notifications
You must be signed in to change notification settings - Fork 37
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
Adding Find-AzureVmKnownIssuesWindows.ps1 #16
base: master
Are you sure you want to change the base?
Conversation
Find-AzureVmKnownIssuesWindows.ps1
Outdated
|
||
# | ||
# RDP settigns | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
Find-AzureVmKnownIssuesWindows.ps1
Outdated
$Current = (Get-ItemProperty HKLM:\SYSTEM\Select -Name Current).Current | ||
if ($null -eq $Current) | ||
{ | ||
$Current = 1 # dafault |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
Find-AzureVmKnownIssuesWindows.ps1
Outdated
Write-Host ("`nWARN | Deny RDP Connections`n RDP is set to deny connections, current value of 'fDenyTSConnections' is '{0}'`n Run the following commands to fix this problem: (copy & paste line by line)`n >`n `$reg='HKLM:\System\ControlSet00$Current\Control\Terminal Server'`n Set-ItemProperty -Path `$reg -Name 'fDenyTSConnections' -Value 0`n" -f $RDPSettings.fDenyTSConnections) -ForegroundColor Yellow | ||
} | ||
|
||
# if PortNumber is not 3380 then RDP is not using the default port |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3389
Find-AzureVmKnownIssuesWindows.ps1
Outdated
Write-Host ("`nWARN | RDP is listening on a specific NIC `n Remore Desktop is listening on NIC '{0}', by default RDP listen on all NICs`n Run the following commands to fix this problem: (copy & paste line by line)`n >`n `$reg='HKLM:\SYSTEM\ControlSet00$Current\Control\Terminal Server\WinStations\RDP-Tcp'`n Set-ItemProperty -Path `$reg -Name 'LanAdapter' -Value 0`n Restart-Service TermService -Force`n" -f $RDPSettings.LanAdapter) -ForegroundColor Yellow | ||
} | ||
|
||
# RDP settigns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo. Did you actually mean to have the same heading again here? I see you do that consistently below. Perhaps there is a open/close section syntax?
Find-AzureVmKnownIssuesWindows.ps1
Outdated
elseif ($nics.Count -eq 1) | ||
{ | ||
# netconnectionstatus = 2 > Connected | ||
if ($nics[0].netconnectionstatus -ne 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use an enum above so you could do something like [NicStatus]::Connected? Likely would make it easier to read
Find-AzureVmKnownIssuesWindows.ps1
Outdated
# if PortNumber is not 3380 then RDP is not using the default port | ||
if ($RDPSettings.PortNumber -ne 3389) | ||
{ | ||
Write-Host ("`nWARN | RDP is not using default Port`n Remore Desktop is set use '{0}' Port, the default RDP port is '3389'`n Run the following commands to fix this problem: (copy & paste line by line)`n >`n `$reg='HKLM:\SYSTEM\ControlSet00$Current\Control\Terminal Server\WinStations\RDP-Tcp'`n Set-ItemProperty -Path `$reg -Name 'PortNumber' -Value 3389`n Restart-Service TermService -Force`n" -f $RDPSettings.PortNumber) -ForegroundColor Yellow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
port
instead of capital Port
a couple times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM as an initial commit but I did not perform test runs on it.
Adding Find-AzureVmKnownIssuesWindows.ps1 which will help troubleshoot unable to RDP issues for Windows VMs when using Serial Console on Azure Portal