Windows Server 2016- three ways to backup and restore NPS server

This section give you a brief introduction about the backup and restore operations NPS Network Policy Server, please find three ways:

Method a: patterning the NPS backup restore:

Graphical backup NPS:

1.NPS Network Policy console, right-click Properties Select "Export Configuration" option:


2. Because NPS add Radius client needs to add the corresponding shared key, here we need to check the "I know I am exporting all shared secrets" and determine:


3. Specify NPS Export Configuration placed path and click save:


4. Tip the export operation is complete, we can view the corresponding information in the path specified in Step 3:


Graphical restore NPS:

1.NPS Network Policy console, right-click Properties Select "Import configuration" option:

 

2. Specify the storage location corresponding to the configuration file:


3. Select pop "OK" to continue:

 

4. Complete import policy.


NOTE: If you do not authorize, please click "Register server in Active Directory" in the console.


Method Two: netsh backup and restore NPS:

Netsh command-line export the NPS configuration:

netsh nps export filename = "C:\NPS_Bak_20190608.xml" exportPSK = YES


NPS netsh command to import configuration:

netsh nps import c:\NPS_Bak_20190608_Netsh.xml


Command line Note:

C:\>netsh nps /?

下列指令有效:

此上下文中的命令:

?              - 显示命令列表。

add            - 添加配置。

delete         - 删除配置。

dump           - 显示一个配置脚本。

export         - 导出配置。

help           - 显示命令列表。

import         - 导入配置。

rename         - 重命名配置。

reset          - 重置配置。

set            - 设置配置。

show           - 显示配置。

C:\>netsh nps export /?

export

   [ filename  = ] filename

   [ exportPSK = ] YES

   导出配置。

   filename   - 文件路径(必需)。

   exportPSK – 为 RADIUS 客户端和远程 RADIUS 服务器导出共享机密(必需)。

   如果要导出 NPS 服务器配置,则还必须导出所有共享机密。不支持导出不含共享机

   密的 NPS 服务器配置。

   导出的文件包含 RADIUS 客户端和远程 RADIUS 服务器组成员的未加密共享机密。

   因此,应确保将该文件存储在某个安全的位置,以防止恶意用户访问该文件。

   另外,不会将 SQL Server 日志记录设置导出到该文件。在另一个 NPS 服务器上导

   入该文件之后,必须手动配置 SQL Server 日志记录。

   示例:

      export filename = "c:\config.xml" exportPSK = YES



方法三:Powershell备份还原nps:

powershell命令行导出NPS配置:

Export-NpsConfiguration -Path "C:\NPS_Bak_20190608_PS.xml"


powershell命令行导入NPS配置:

Import-NpsConfiguration C:\NPS_Bak_20190608_PS.xml


PS C:\> help "nps"

Name                        Category Module   Synopsis

----                        -------- ------   --------

npssc                       Alias             New-PSSessionConfigurationFile

Remove-NpsRadiusClient      Cmdlet   Nps      Remove-NpsRadiusClient...

Get-NpsSharedSecretTemplate Cmdlet   Nps      Get-NpsSharedSecretTemplate...

Import-NpsConfiguration     Cmdlet   Nps      Import-NpsConfiguration...

New-NpsRadiusClient         Cmdlet   Nps      New-NpsRadiusClient...

Export-NpsConfiguration     Cmdlet   Nps      Export-NpsConfiguration...

Set-NpsRadiusClient         Cmdlet   Nps      Set-NpsRadiusClient...

Get-NpsRadiusClient         Cmdlet   Nps      Get-NpsRadiusClient...

PS C:\> help Export-NpsConfiguration

名称    Export-NpsConfiguration

语法    Export-NpsConfiguration [-Path] <string>  [<CommonParameters>]

别名    无

欢迎关注微信公众号:小温研习社

欢迎关注yanxishe.png

Guess you like

Origin blog.51cto.com/wenzhongxiang/2406404