none
Powershell Script to delete specific cookie

    Question

  • Hello,

    I want to delete few specific cookies ( Dont want to delete all) using batch file. Could someone please give me a powershell script which does this job.


    Mahesh

    Sunday, August 25, 2013 5:20 AM

Answers

  • Hi,

    We could first find those cookies stored path, use select-string to find out what kind of cookies you want to remove, and then use remove-item command to delete them, please refer to the below link:

    http://csoposh.blogspot.in/2011/11/delete-cookies.html

    Regards,

    Yan Li


    Cataleya Li
    TechNet Community Support

    Monday, August 26, 2013 6:42 AM
    Moderator
  • get-childitem "C:\Users\testuser1\AppData\Local\Microsoft\Windows\Temporary Internet Files\*" -include * -recurse -force | ? {$_.name -match "videoplayback"} | Remove-item -force -recurse 

    The above tested on the win7 machine. Change the location and matching criteria.

    The below is the single command to remove the browser history.

    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8


    Thanks Azam When you see answers please Mark as Answer if Helpful..vote as helpful.

    Monday, August 26, 2013 12:46 PM

All replies