I'm using psnmap to scan a remote pc via powershell (for some ports).
That works fine when I use Invoke-PSnmap -ComputerName computer01 -Port 3389,5985
but when I want to do this via a popup, it does not work (it does work with only one port).
This is what does NOT work (multiple ports):
Add-Type -AssemblyName Microsoft.VisualBasic
$Ports = [Microsoft.VisualBasic.Int
'Enter port to scan', 'Portscan', "3389,5985")
$Result = Invoke-PSnmap -ComputerName computer01 -Port "$Ports"
It says the value for $ports is not ok.
Please advise howto approach.