wordpress   发布时间:2022-04-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Enable and Disable RDP NLA using PowerShell大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

Enable_RDP_NLA #PowersHell script to enable Network Level Authentication for Remote Desktop services Connections #The need arose when trying to RDP using a third party application and it gave the foll

Enable_RDP_NLA

#PowersHell script to enable Network Level Authentication for Remote Desktop services Connections
#The need arose when trying to RDP using a third party application and it gave the following error:
#The remote computer '<machine name>' requires Network Level Authentication,which your computer does not support.

#The following script has to be run on the remote machine using RDC (Remote Desktop Connection) on which you are attempTing to RDP to and gives the error.
# Post that you should be able to successfully run RDP using the third party application.

# Comparative .reg script is as below:
# Windows Registry Editor Version 5.00

# [HKEY_LOCAL_MACHINE\SYstem\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]
# "UserAuthentication"=dword:00000000
# "SecurityLayer"=dword:00000000

# Author - Vikram Bedi 
# vikram.bedi.it@gmail.com 

#PowersHell v2.0
#v1.0 Initial Script

$registryPath = "HKLM:\SYstem\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp"

$Name1 = "UserAuthentication"
$value1 = "00000001"
IF(!(Test-Path $registryPath))
  {
    New-Item -Path $registryPath -Force | Out-Null
    New-ItemProperty -Path $registryPath -Name $name1 -Value $value1 -PropertyType DWORD -Force | Out-Null
  }
 ELSE 
  {
    New-ItemProperty -Path $registryPath -Name $name1 -Value $value1 -PropertyType DWORD -Force | Out-Null
  }
$Name2 = "SecurityLayer"
$value2 = "00000001"
IF(!(Test-Path $registryPath))
  {
    New-Item -Path $registryPath -Force | Out-Null
    New-ItemProperty -Path $registryPath -Name $name2 -Value $value2 -PropertyType DWORD -Force | Out-Null
  }
 ELSE 
  {
    New-ItemProperty -Path $registryPath -Name $name2 -Value $value2 -PropertyType DWORD -Force | Out-Null
  }

Disable_RDP_NLA

#PowersHell script to enable Network Level Authentication for Remote Desktop services Connections
#The need arose when trying to RDP using a third party application and it gave the following error:
#The remote computer '<machine name>' requires Network Level Authentication,which your computer does not support.

# The following script has to be run on the remote machine using RDC (Remote Desktop Connection) on which you are attempTing to RDP to and gives the error.
# Post that you should be able to successfully run RDP using the third party application.

# Comparative .reg script is as below:
# Windows Registry Editor Version 5.00

# [HKEY_LOCAL_MACHINE\SYstem\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]
# "UserAuthentication"=dword:00000000
# "SecurityLayer"=dword:00000000

# Author - Vikram Bedi 
# vikram.bedi.it@gmail.com 

#PowersHell v2.0
#v1.0 Initial Script

$registryPath = "HKLM:\SYstem\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp"

$Name1 = "UserAuthentication"
$value1 = "00000000"
IF(!(Test-Path $registryPath))
  {
    New-Item -Path $registryPath -Force | Out-Null
    New-ItemProperty -Path $registryPath -Name $name1 -Value $value1 -PropertyType DWORD -Force | Out-Null
  }
 ELSE 
  {
    New-ItemProperty -Path $registryPath -Name $name1 -Value $value1 -PropertyType DWORD -Force | Out-Null
  }
$Name2 = "SecurityLayer"
$value2 = "00000000"
IF(!(Test-Path $registryPath))
  {
    New-Item -Path $registryPath -Force | Out-Null
    New-ItemProperty -Path $registryPath -Name $name2 -Value $value2 -PropertyType DWORD -Force | Out-Null
  }
 ELSE 
  {
    New-ItemProperty -Path $registryPath -Name $name2 -Value $value2 -PropertyType DWORD -Force | Out-Null
  }

大佬总结

以上是大佬教程为你收集整理的Enable and Disable RDP NLA using PowerShell全部内容,希望文章能够帮你解决Enable and Disable RDP NLA using PowerShell所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。