Newbee need help


I will use this code with powershell:

Remove-Item -Path “C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service*” -Verbose

my problem is, it needs an answer as Keystroke: “J”

I found some things:

#Wscript objekt
$wshell = New-Object -com “Wscript.Shell”


Remove-Item -Path “C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service*” -Verbose


Start-Sleep 5

send J for yes


It seems not to run corrct can someone help me? thanks a lot

Welcome back to the forum. :wave:t3: Long time no see.

Did you try the parameter -Force?

hi, yes true :wink:

you mean:

Remove-Item -Path “C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service*” -Verbose -Force


And please … when you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.

Thanks in advance

How to format code in 1 <---- Click :point_up_2:t4: :wink:

(sometimes the button hides behind the settings gear symbol :wink: )