Picture of zele
Registered 7 years 117 days
zele Monday, 12 February 2018, 03:34 PM
Adding New User over Powershell
Hi,

did someone knows if its possible to add a new User on IP6000 over a script?

BG
zele
Picture of Sebastian Hayer-Lutz (innovaphone)
Moderator Registered 7 years 165 days
Sebastian Hayer-Lutz (innovaphone) Tuesday, 13 February 2018, 08:08 AM
Re: Adding New User over Powershell
Hi Zele,

whta kind of user do you mean? A PBX User Object or new PBX Admin?

You talk about "Powershell" and "script".
Do your realy mean microsoft's Powershell or our Update Script mechanism?

Best regards,
Basti
Picture of zele
Registered 7 years 117 days
zele Tuesday, 13 February 2018, 08:19 AM
Re: Adding New User over Powershell
Hi Basti,

i mean a new PBX User Object with number, password, template..

I have a MS Powershell script to add new user in our AD, Exchange and ACD. Now i want extend it, to at automatic the user on the innovaphone.

BG
zele
Picture of Sebastian Hayer-Lutz (innovaphone)
Moderator Registered 7 years 165 days
Sebastian Hayer-Lutz (innovaphone) Tuesday, 13 February 2018, 08:51 AM
Re: Adding New User over Powershell
Hi Zele,

the best way is to replicate Users from AD via LDAP ;)

Alternative you are able to put configurations via URL Command or XML Import to the PBX.


XML Import (You must simulate the HTTP Request)

Example URL Command (Create new user):
https://<ip>/PBX0/ADMIN/mod_cmd_login.xml?cmd=submit-object&tab-active=&repsrc=&search-grp=&text=&cn=username&dn=&h323=username&e164=1337&email=&pwd=pass&pwd1=pass&node=root&loc=PBX&fake=&obj-url=&gi=&config=&no-devs=update&dev1.hw=&dev1.text=&filter=&cd-filter=&cfnr=&busy-out=&uc=&messages=&apps-my=&gw.name=&gw.ipei=&gw.dsp=&gw.ac=&gw.subs=&gw.fc=&gw.cki=&gw.ciph=&gw.end=.

You can modify as you need, but please note that the passwords/informations are not transmitted encrypted.
Picture of Alexander 3570
Registered 7 years 281 days
Alexander 3570 Tuesday, 13 February 2018, 08:42 AM in response to zele
1 of 1 users consider this post helpful
Re: Adding New User over Powershell
Hi Zele,

this should work via Invoke-webrequest command on Powershell. Im using this to BackUp our IPVAs.

It looks like this:

#create Login Creds for IPVAs
$user = 'Admin-User'
$pass = 'somesupercryptopw'

$pair = "$($user):$($pass)"

$encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))

$basicAuthValue = "Basic $encodedCreds"

$Headers = @{
Authorization = $basicAuthValue
}
#Invoke Request
Invoke-WebRequest -Uri 'http://ipva.ip.add.res/cfg.txt?cd=complete-IPVA-xx-xx-xx.txt' -Headers $Headers -OutFile \\back\up\path\ipva_save.txt

This way it should work, but I am not shure if there is a http-request-command for Object creation. But Maybe this Idea is an approach to your needs.

Regards Mr. Error
← You can define your color theme preference here