1

How do I add an IP address to a users dial in tab within powershell.

I want to do it about a 100 times so I was hoping to use the ad cmdlets to perform the task reading from a csv file the account name and the ip address.

Does anybody know the property to set this?

Thanks

Paul

1
  • "dial in tab"... Sorry, what version of Windows is this for? Where can I find this tab exactly?
    – Marco Shaw
    Mar 12, 2010 at 13:41

3 Answers 3

2

To configure the "Assign a Static IP Address, you need to set the properties msRADIUSFramedIPAddress and msRASSavedFramedIPAddress properties, however it says on those pages that they are used internally and not to modify them directly.

The RAS User Administration Functions page may have some potential.

2

I was needing to do something similar today and ended up using something like this:

PS C:\> $myip="192.168.1.254";$bytes=([IPAddress]$myip).GetAddressBytes();[Array]::Reverse($bytes);[BitConverter]::ToUInt32($bytes,0)
3232236030
PS C:\> $myip="3232236030";([system.net.ipaddress] $myip).ipaddresstostring
192.168.1.254
PS C:\>Set-ADUser -Identity jdoe -Add @{msRADIUSFramedIPAddress="3232236030"}
PS C:\>Set-ADUser -Identity jdoe -Remove @{msRADIUSFramedIPAddress="3232236030"}

Reading CSV input will vary according to how you format your CSV file, but PowerShell has something to help: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/import-csv?view=powershell-7.3

0

I assume you are referring to configuring Routing and Remote Access using powershell. A quick search finds this for setting RRAS Dial-in Attribute using Powershell to query Active Directory and WMI.

You must log in to answer this question.