NPS - Use Existing Shared Secret Template?

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 2 years, 1 month ago.

  • Author
    Posts
  • #20272
    Profile photo of Jdominioni .
    Jdominioni .
    Participant

    Hello,

    So in my environment we have to add NPS RADIUS clients on a somewhat regular basis. They come in sporadically one at a time, so there's no big list to work from and loop through.

    This code is very rudimentary, but it works:

    
    # Load the Shared Secret into a variable
    $SharedSecret = Get-NpsSharedSecretTemplate -Name "xCorrectName"
    
    # Get client name and IP address
    $NPSClientName = Read-Host -Prompt 'Input NPS Client Friendly Name:'
    $NPSClientAddress = Read-Host -Prompt 'Input NPS Client IP Address:'
    
    # Add the client to NPS
    New-NpsRadiusClient -Name $NPSClientName -Address $NPSClientAddress -SharedSecret $SharedSecret.SharedSecret
    
    

    The trouble is that what I'd really like it to do is apply the shared secret template that we have, not just the shared secret value. In the properties window of the newly-created client entry, the shared secret template pull-down is "None." We like the ability to change a template and have that change applied to the entire (rather large) environment.**

    I've read and read and cannot find a way of doing this; it will only apply the shared secret value, not the actual template. Any ideas?

    Thank you for your help,

    Jason

    ** I know Set-NpsRadiusClient will change the value of all the entries at once, but the "must use template" paradigm is one I'm not going to be able to convince my management to move away from.

  • #20351
    Profile photo of Don Jones
    Don Jones
    Keymaster

    I'm guessing nobody here is familiar with the NPS RADIUS solution from a PowerShell perspective :(.

You must be logged in to reply to this topic.