question

MohdArif-3014 avatar image
0 Votes"
MohdArif-3014 asked IanXue-MSFT answered

How to add NPS policy - Server 2012

I have two NPS servers NPS1 and NPS2.
NPS1 has some policy already configure and NPS2 has many policy configured. Now I have to move all the policy from NPS1 to NPS2. How can I do it using PowerShell?

I tried using Export-NPSConfiguration and Import-NPSconfiguration. But problem is when you import command to import NPS policies, it will overwrite existing policy. So I am unsure how could I do it. Any help pls?

windows-serverwindows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

IanXue-MSFT avatar image
0 Votes"
IanXue-MSFT answered

Hi,

Unfortunately I don't find such a cmdlet in the NPS module. You may have to implement it yourself.

https://docs.microsoft.com/en-us/powershell/module/nps/

Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

IanXue-MSFT avatar image
0 Votes"
IanXue-MSFT answered

Hi,

You can export the policies on NPS2 and replace the policies you want to change with those exported from NPS1.

To parse the XML file with powershell you can refer to this link
https://adamtheautomator.com/powershell-parse-xml/

Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MohdArif-3014 avatar image
0 Votes"
MohdArif-3014 answered

That is advance level of task. Is there no easy way putting some switch in powershell which will add NPS policies instead of replacing them?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.