WiFiProfileManagement icon indicating copy to clipboard operation
WiFiProfileManagement copied to clipboard

Error when using Remove-WiFiProfile

Open Brodieman opened this issue 3 years ago • 5 comments

Using command:

Remove-WiFiProfile -ProfileName <SSID>

Return code: -37104

Remove-WiFiProfile : Exception calling "ShouldProcess" with "1" argument(s): "Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available." At C:\WINDOWS\AdminArsenal\PDQInventoryRemoteCommand\service-1\exec\command.ps1:3 char:1

  • Remove-WiFiProfile -ProfileName <SSID>
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Remove-WiFiProfile
    

Brodieman avatar Nov 01 '21 14:11 Brodieman

More information is needed. Are you using PDQDeploy? If so, what happens if you don't use it and just run the command? If possible, please show the entire code of the script you ran.

mkht avatar Nov 10 '21 11:11 mkht

I was using "Remote Command" from PDQ Inventory.

If I do it manually, it works. I was HOPING to use this module to better control Wi-Fi profiles on our teacher laptops. I understand if it's something that you can't make work through PDQ or don't have the time to try. Thanks!

Brodieman avatar Nov 10 '21 13:11 Brodieman

I've never used PDQ Inventory so I don't know exactly what it is, but the error message suggests that the confirm prompt may be the problem. Please try Remove-WiFiProfile -ProfileName <SSID> -Confirm:$false. This option will suppress the confirmation message.

mkht avatar Nov 10 '21 13:11 mkht

No worries, had a read the error closer I would have seen that LOL. Suppressing the confirmation works, thanks!! I guess I didn't try it manually to know that there was a confirmation

Brodieman avatar Nov 10 '21 13:11 Brodieman

Are you going to close this issue @Brodieman?

krzydoug avatar May 31 '23 05:05 krzydoug