Sep 16 2020 11:47 PM
Hi All,
I'm new to Powershell.
I try to run this script Remove-DistributionGroupMember -Identity "group name" -member "email member" on Powershell. every time I run this script I will get a response to typing 'Y'. Is there any complete script so I don't need to type 'Y'? I've tried added Echo Y but it's not working.
Thanks.
Sep 17 2020 12:17 AM
That's why we have the -Confirm switch. And as a new to PowerShell, do yourself a favor and make a habit of checking the help for any cmdlet you want to run.
Sep 17 2020 04:15 AM
Solution
This is the command
Remove-DistributionGroupMember -Identity MyDisGroup -Member administrator -Confirm:$false
Sep 23 2020 01:54 AM
Sep 23 2020 01:56 AM
@VasilMichev hi, thank you for your advice.
Aug 08 2021 12:31 PM
Hi, I'm using same switch to remove ie from systems with PowerShell script not working, I'm sure I'm doing something wrong, pls help to get the correct command
Disable-WindowsOptionalFeature -FeatureName Internet-Explorer-Optional-amd64 -Online -Confirm
Aug 08 2021 06:39 PM
Sep 17 2020 04:15 AM
Solution
This is the command
Remove-DistributionGroupMember -Identity MyDisGroup -Member administrator -Confirm:$false