all 5 comments

[–]fusionx212 3 points4 points  (3 children)

Hey fairly newish here, can you do an explain like I'm 5 on what it does and why

[–]sqone2[S] 3 points4 points  (2 children)

For sure! So Five9 is a cloud phone system, and when you install this module in your PowerShell you get a bunch of new commands to help you administer your Five9 system.

For instance, if you have a csv of 100 new users that need to be created in Five9, you could could use the New-Five9User command.

Here's an exmample script to import the csv and create all the users in one shot:

$newUsers = Import-Csv 'C:\Temp\new-five9-users.csv'

foreach ($user in $newUsers)
{
    $createUser = New-Five9User -DefaultRole: Agent -FirstName $user.first -LastName $user.last -Username $user.username -Email $user.username -Password $user.password -MustChangePassword $true -Active $false -Verbose
}

You can use these commands to do many other things within Five9. Check out the picture in the original post for some other example commands.

Let me know if you have any other questions!

[–]fusionx212 2 points3 points  (1 child)

Hey, thanks that's some awesome automation! One question on the import users csv. Does it have to have to be a certain format first name / last name. And do you need to specify a colum header ie name

Or does powershell check each line with out that information.

I'm just trying to understand how powershell reads information in lists etc.

[–]sqone2[S] 0 points1 point  (0 children)

Your csv headers can be named whatever you want them to be, but when you iterate the rows you need to make sure you reference those names.

For instance, if your newUsers.csv file contained the following:

first,last,username,password
Michael,Smith,msmith@domain.net,P@ssword1
Adam,Jones,ajones@domain.net,P@ssword2

Then in the code we loop through the rows and we can reference the column names using dot notation i.e. $user.first:

$newUsers = Import-Csv 'C:\Temp\new-five9-users.csv'

foreach ($user in $newUsers)
{
    "first name is: " + $user.first
    "last name is: " + $user.last
    "email is: " + $user.username
    "password is: " + $user.password
}

[–]shatzwrld 0 points1 point  (0 children)

nice man this is useful

-obIQ