The AudioCodes 400HD series IP phones are easy-to-use, feature-rich IP Phones, that are perfect for Skype for Business. In this collection of configuration settings, powershell module, and scripts you can easily discover common configuration settings.
- IP Phone PowerShell Modules
- IP Phone PowerShell Scripts (including Reboot, Logon, Logoff, Restart, FactoryDefault support)
- IP Phone Configuration Examples
To install the IP Phone module with PowerShellGet
Install-Module -Name ipphone -Scope CurrentUser
To update the IP Phone module with PowerShellGet
Install-Module -Name ipphone -Scope CurrentUser
List all commands in IP Phone Module
Get-Command -Module ipphone
By default your computer may not trust the SSL certifcate on the IP Phone, this command will check if your computer trusts the IP Phone SSL certificate
test-ipphoneTrustCertPolicy -ipphone 172.16.18.131
if the IP Phone is not trusted modify the trust cert policy (powershell core you use -skipcertificatecheck instead). Any changes are only valid for the current shell, if you close powershell the TrustAllCertPolicy will be reverted
set-ipphoneTrustAllCertPolicy
The following example will log an AudioCodes IPP Phone on remotely.
- ipphone Is the IP Address or FQDN of the IP Phone you want to log onto
- ippcredential Is the Credential(username/password) of the IP Phone (default is admin/1234)
- sipaddress Is the sip address of the user that you want to log the phone in as
- sipcredential Is the credential(username/password) of the user that you want to log the phone in as
set-ipphoneTrustAllCertPolicy
$ipphone = “172.16.18.135”
$ippcredential = get-credential -Message "Credential" -UserName "admin"
$sipaddress = “shane@shoey.xyz”
$sipcredential = get-credential -Message "Credential" -UserName $sipaddress
$websession = new-ipphonewebsession -ipphone $ipphone
connect-ipphone -ipphone $ipphone -credential $ippcredential -websession $websession
Invoke-ipphoneLoginUser -ipphone $ipphone -sipcredential $sipcredential -sipaddress $sipaddress -websession $websession
The following example will log an AudioCodes IPP Phone on remotely.
- ipphone Is the IP Address or FQDN of the IP Phone you want to log onto
- ippcredential Is the Credential(username/password) of the IP Phone (default is admin/1234)
set-ipphoneTrustAllCertPolicy
$ipphone = “172.16.18.135”
$ippcredential = get-credential -Message "Credential" -UserName "admin"
$websession = new-ipphonewebsession -ipphone $ipphone
connect-ipphone -ipphone $ipphone -credential $ippcredential -websession $websession
Invoke-ipphoneLoginUser -ipphone $ipphone -cloud -websession $websession
get-ipphonestatus -ipphone $ipphone -websession $websession
The following example will logoff the current logged in user of an AudioCodes IPP Phone.
- ipphone Is the IP Address or FQDN of the IP Phone you want to log onto
- ippcredential Is the Credential(username/password) of the IP Phone (default is admin/1234)
set-ipphoneTrustAllCertPolicy
$ipphone = “172.16.18.135”
$ippcredential = get-credential -Message "Credential" -UserName "admin"
$websession = new-ipphonewebsession -ipphone $ipphone
connect-ipphone -ipphone $ipphone -credential $ippcredential -websession $websession
Invoke-ipphoneLoginUser -ipphone $ipphone -logoff -websession $websession
The following example will log an AudioCodes IPP Phone based on a json file. It will scan the subnet given and only logon to the phone if the MAC address matches
The following information is required in the json file
- mac is the mac address of the IP Phone in format 00-00-00-00-00-00
- username is the username of the account you want to log the phone in as (username@domain or domain\username)
- sipaddress is the sip address is the credentials of the user that you want to log the phone in as
- password is the password of the Users
If you are storing the password do not use cleartext instead use securestring and copy the resulting string into the json file.
"mypassword" | ConvertTo-SecureString -AsPlainText -Force | ConvertFrom-SecureString
The password is only valid when logged in as the same user/same password as it was created with.
Do Not do this! Storing passwords in a text file in clear text is a security risk, do not do this! If you must do this then use the -cleartext parameter.
if you prefer to store the file in csv format you can do the following to convert it into JSON prior to importing it.
get-content .\phones.csv | ConvertFrom-Csv | convertto-json | Out-File .\phones.json
[
{
"mac": "00-90-8F-00-00-00",
"username": "shane@shoey.example",
"sipaddress": "shane@shoey.example",
"password": null
},
{
"mac": "00-90-8F-00-00-00",
"username": "debra@shoey.example",
"sipaddress": "debrab@shoey.example",
"password": null
}
]
NOTE: This script is currently seperate to the module and you must download seperatly
./invoke-ipphoneScanLogin.ps1 -subnet "172.16.18." -first 131 -last 132 -file .\PRIVATE-phones.json
NOTE: This script is currently seperate to the module and you must download seperatly
# Reboot ALL Phones in subnet
./invoke-ipphoneScanMaintenanceTask.ps1 -subnet "172.16.18." -first 131 -last 132
# Factory Default ALL Phones in subnet
./invoke-ipphoneScanMaintenanceTask.ps1 -subnet "172.16.18." -first 131 -last 132 -FactoryDefault
#Log Off Phones ALL Phones in subnet
./invoke-ipphoneScanMaintenanceTask.ps1 -subnet "172.16.18." -first 131 -last 132 -logoff