Forum Discussion
Marcel_Kuiper_5
Nimbostratus
Jun 22, 2007Adding users on 9.1.2
Hi,
Since we're changing account names I need to create a lot of users on all of our BigIP systems. However my perl scripting is not succesful so far which has probably to do with the way I ...
Jan 24, 2008
Ahh, some fun PowerShell stuff!
For the methods that require typed structures, you need to create them with the "New-Object" Cmdlet. Here's how you would make a call to create_user()
$ic = Get-F5.iControl
$userInfo = New-Object -TypeName iControl.ManagementUserManagementUserInfo
$userInfo.user = New-Object -TypeName iControl.ManagementUserManagementUserID
$userInfo.user.name = "testaccount"
$userInfo.user.full_name = "Joe User"
$userInfo.role = "USER_ROLE_ADMINISTRATOR"
$userInfo.password = "foobar"
$userInfo.home_directory = "/home/joeuser"
$userInfo.login_shell = "/bin/bash"
$userInfo.user_id = 0
$userInfo.group_id = 500
$ic.ManagementUserManagement.create_user( (,$userInfo) )You'll notice that the method takes an array, so the paramter is surounded by parenthesis and prefixed with a comma to indicate the creation of an array.
Hope this helps...
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects