Okt3Written by:Martin 03.10.2010 20:34  Shortly after the beta you’ll be able to download a Windows PowerShell 2.0 module for SwyxWare Administration. It’s something I wrote for automating some initial testing of our daily builds. It’s based on the ConfigDataStore API. Here’s an example:
|
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
|
connect-IpPbxCDS -ServerName SRV01 -UseWindowsAuthentication | out-null
# create a user
$User = new-IpPbxUser -Name "Alice" |
add-IpPbxInternalNumber -InternalNumber (new-IpPbxInternalNumber -Number "900") -passthru
# enable Windows authentication using current user
$User.WindowsLoginAllowed = $True
$NTAccount = new-object "UserNTAccountEntry"
# current user SID as string
$NTAccount.NTAccount = [System.Security.Principal.WindowsIdentity]::GetCurrent().User.value
$User.UserNTAccountEntryCollection.Add($NTAccount)
# enable username/password authentication
$User.IpPbxLoginAllowed = $True
$User.IpPbxPasswordDecrypted = "password"
# configure unconditional call forwarding to voicemail
$User.DefaultFwdNum = "voicemail"
$User.DefaultFwd = $true
$user.EMailAddr = "alice@example.com"
# add user to database
$User | add-ippbxuser
|
Tags: |