I can ‘Get-Member’ of simple cmdlets such as Get-ChildItem | Get-Member
or Get-Process | Get-Member
, but I am having trouble getting properties for certain items. A cmdlet I cannot find properties for is Get-VpnConnection | get-member
or Set-NetIPInterface | Get-Member
(results in error). For example I had created a script to create a VPN with specific settings, with a lot of research. Now I wish to add to this script, as in I need to have {two boxes ticked}, but I don’t know how to find what or where those settings are through PowerShell. Here is 2 lines of the script. For example how does one find out that -automaticmetric
is a property? How how does one find out that -TunnelType
is a property?
Add-VpnConnection -Name $VPNName -ServerAddress $ServerAddress -TunnelType L2tp -EncryptionLevel Required -AuthenticationMethod MSChapv2 -AllUserConnection -L2tpPsk $L2TPKey -Force -RememberCredential -DnsSuffix $DNSSuffix Set-NetIPInterface $VPNName -automaticmetric disabled -InterfaceMetric 1
submitted by /u/16o1denRatio
[link] [comments]
The post Can’t ‘Get-Member’ of some cmdlets. How do you ‘just know’ what a cmdlet’s properties are? appeared first on How to Code .NET.