I am trying to create a SQL availability group listener using the SQLPS module however I am having a very strange issue. When the command it was just hanging and doing nothing unless I press ctrl+c at which point it would just break out. After running with -debug switch I was able to see that it is checking object existence on the sqlserver PSDrive and looping forever.....
I've tried with various different combinations with/without staticip etc and nothing seems to produce a successful result.
New-SqlAvailabilityGroupListener -StaticIp "192.168.1.11/255.255.255.0" -Port 1433 -Name AG01Listener -Path 'SQLSERVER:\SQL\2016-2\FifthInstance\AvailabilityGroups' -Verbose -Debug -Confirm:$false
Windows Version: Windows Server 2016
SQL Version: SQL 2016 SP1 Enterprise
SQLPS Version: 1.0. *Seemingly quite old but I don't know if there is a new version. It came preinstalled from SQL Media.
Help is much appreciated