network policy via netsh on nps, constant error

Philippos Ioannou 21 Reputation points
2020-11-09T07:21:35.107+00:00

hello everyone,

i have been trying the last couple of days to add via script to our nps server policies with netsh nps

netsh nps add np name = "TEST" state = "enable" processingorder = "44" policysource = "0" conditionid = "0x1fb5" conditiondata = "S-1-5-21-1611413001-1598968370-1039276024-9724" profileid = "0x100f" profiledata = "TRUE" profileid = "0x1009" profiledata = "0x1" profiledata = "0x2" profiledata = "0x3" profiledata = "0x9" profiledata = "0x4" profiledata = "0xa" profileid = "0x1a" profiledata = "0100000C041914VPN_TEST" profileid = "0x7" profiledata = "0x1" profileid = "0x6" profiledata = "0x2"
when i run the above command i get an error:

the parameter is inccorect

pls note, the above command i got it when i run netsh nps dump exportpsk = yes, and it generated the script for importing so i just changed named the name

im really desperate here i cant seem to understand where the error is
even if i run the below which the simplest with the bare requirements i still get an error the parameter is incorrect

netsh nps add np name = "test" conditionid = "0x1fb5" conditiondata =
"S-1-5-21-1611413001-1598968370-1039276024-9724"

hell even if run microsoft's example from the show help i still get an error ...

any help would be very gratefull.
thank you.

Windows Server Infrastructure
Windows Server Infrastructure
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Infrastructure: A Microsoft solution area focused on providing organizations with a cloud solution that supports their real-world needs and meets evolving regulatory requirements.
544 questions
0 comments No comments
{count} votes

Accepted answer
  1. Candy Luo 12,701 Reputation points Microsoft Vendor
    2020-11-09T09:14:35.043+00:00

    Hi ,

    The netsh nps commands are working fine if these are being used with the parameter "processingorder=x" . If the param is not used you will run into the error "The parameter is incorrect". It is important to make sure before using the param processingorder that the number of the processing order used is not present in the NPS policy list. If the same processing order is already in use the command will fail again with the error "The parameter is incorrect“ .

    As the picture below:

    Example:

    netsh nps add np name = "test" conditionid = "0x1fb5" conditiondata = "S-1-5-21-1611413001-1598968370-1039276024-9724"
    The parameter is incorrect.

    netsh nps add np name = "test" conditionid = "0x1fb5" conditiondata = "S-1-5-21-1611413001-1598968370-1039276024-9724" processingorder = 4
    Ok.

    38248-image.png

    38341-image.png

    (Note: The Processingorder Number can be any number if used as described above)

    Best Regards,

    Candy

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

    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.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Philippos Ioannou 21 Reputation points
    2020-11-09T11:41:56.087+00:00

    i see
    i will try it now and get back to you

    thx very much your reply !!!!

    0 comments No comments

  2. Philippos Ioannou 21 Reputation points
    2020-11-09T11:43:21.583+00:00

    OMG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    i can hug you right now it worked

    THANK YOU SO BUT so much


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.