locked
Modifying network policy profile attribute using netsh RRS feed

  • Question

  • I recently started using netsh to manage NPS. I am wondering if there is a way to modify a specific profile attribute without touching other attributes of a network policy

    Problem:

    Network policy configuration:
    ---------------------------------------------------------
    Name             = blah
    State            = Enabled
    Processing order = 5
    Policy source    = 10

    Condition attributes:

    Name                                    Id          Value
    ---------------------------------------------------------
    Condition0                              0x1023      "XXXXXXXXXXXXXXXXXX"

    Profile attributes:

    Name                                    Id          Value
    ---------------------------------------------------------
    Ignore-User-Dialin-Properties           0x1005      "FALSE"
    NP-Allow-Dial-in                        0x100f      "TRUE"
    NP-Allowed-EAP-Type                     0x100a      "19000000000000000000000000000000"
    NP-Authentication-Type                  0x1009      "0x5" "0x1" "0x2" "0x3" "0x4"
    Vendor-Specific                         0x1a        "01000006220106blah"
    Framed-Protocol                         0x7         "0x1"
    Service-Type                            0x6         "0x2"

    I would like to change vendor specific parameter alone from "01000006220106blah" to "01000006220106rofl".

    I tried using 

    netsh nps set np name = "blah" profileid = "0x1a"  profiledata = "01000006220106rofl"

    With the above i am able to set profileid "0x1a" to "01000006220106rofl" but all the other profile attributes are set to default values.
    After running the command, profile attributes are as below

    Profile attributes:

    Name                                    Id          Value
    ---------------------------------------------------------
    NP-Authentication-Type                  0x1009      "0x3" "0x9" "0x4" "0xa"
    Vendor-Specific                         0x1a        "01000006220106rofl"

    As you can see NP-Authentication-TYpe, NP-Allowed-EAP-Type and other attributes are set to default values.

    Is there a way to change one profile attribute while keeping the others untouched using netsh or any another command.

    Last resort is to set all attribues excpet "Vendor-Specific" to existing values and set Vendor-Specific attribute to new value in the same netsh command

    C:\>netsh nps set np name = "blah" profileid = "0x1a"  profiledata = "01000006220106blah" profileid = "0x1009" profiledata = "0x5"  profiledata = "0x1"  profiledata = "0x2"  profiledata = "0x3"  profiledata = "0x4" profileid = "0x100a"  profiledata = "19000000000000000000000000000000"


    Learning

    Friday, July 3, 2020 9:22 AM

All replies