Skip to content

Using avmtools

Gincules edited this page Apr 4, 2023 · 1 revision

Using avmtools

Here are some examples how you can use command Get-AvmDeviceSecurityPort in your PowerShell scripts

Import your credential file

[PSCredential]$Credential = Import-Clixml -Path "${env:APPDATA}\PScred\avmtools-credential.xml"

# Import avmtools module
Try {
     Import-Module avmtools
} Catch {
     Write-Output "Unable to import module avmtools."
     exit 1
}

Use MyFritz connection (recommended - not all commands supported)

Make sure to use the configured MyFritz port instead of 49000 or 49443

# Parameters splattered for readability
$splatParameters = @{
     RemoteAccess = $true
     Url = "https://myfritzaddress12.myfritz.net"
     Port = 12345
     Credential = $Credential
}
Get-AvmDeviceSecurityPort @splatParameters

Use secure connection with valid certificate and https - default TR-064 port for https is 49443

Get-AvmDeviceSecurityPort -Url "https://fritz.box" -Port 49443 -Credential $Credential
Get-AvmDeviceSecurityPort -Url "https://192.168.178.1" -Port 49443 -Credential $Credential

Use insecure connection over http - default TR-064 port for http is 49000

Get-AvmDeviceSecurityPort -Insecure -Url "http://fritz.box" -Port 49000 -Credential $Credential
Get-AvmDeviceSecurityPort -Insecure -Url "http://192.168.178.1" -Port 49000 -Credential $Credential
Clone this wiki locally