I'm trying to script the configuration of my ethernet ports on my server. I want to disable all ports that do not have a cable plugged into it. I have this command -
Get-NetAdapter -Name * | ? status -eq Disconnected | Disable-NetAdapter
This works however it prompts me to confirm before moving on to the next part of my script. How do I script it to auto confirm yes to all?
Ryan