Forum Discussion
Unable to suppress confirmation popups in Powershell for Format-volume and Remove-Partition
- May 20, 2024
For some reason if I run
Stop-Service -Name ShellHWDetection
This seems to have fixed the issue, I start the service again when the rest of the code finishes. Thanks for the assistance. Much appreciated
Harm_Veenstra Many thanks for your assistance Harm
The code works fantastically and completes the format etc, It seems that when the new partition is created the Format Prompt pops up. The script does what it is supposed to do, but unfortunately this Pop Up still appears. I'll keep investigating and see if I can figure out whats causing it.
- leonmoodleyMay 20, 2024Copper Contributor
For some reason if I run
Stop-Service -Name ShellHWDetection
This seems to have fixed the issue, I start the service again when the rest of the code finishes. Thanks for the assistance. Much appreciated- May 20, 2024Ah 👍 nice find!
- leonmoodleyMay 20, 2024Copper Contributor
Hi Harm
I have tested with automount disabled but still the same result. I can confirm though that the command below
$DD | New-Partition -UseMaximumSize -DriveLetter d -ErrorAction Stop | Out-Nullis the one which triggers the POP up message for some weird reason.
This also seems to be the case when the script runs again and finds a partition, The Remove partion command also triggers the pop up.
Once again many thanks for your help