Coder Social home page Coder Social logo

Comments (7)

patridge avatar patridge commented on June 3, 2024 2

I was just able to fix this on my system. Defender completely deletes that ConsoleMode.ps1 file no matter where it is created, including during reinstall, which made things a challenge. Here are the steps I needed to get back to working again.

  1. Add exclusion to parent folder to allow you to install the new ConsoleMode.ps1 in the future: C:\Users\{username}\Documents\PowerShell\Modules\posh-git\1.1.0\
  2. Add exclusion to the entire Temp folder where the posh-git installer will create the same file when you try to reinstall: C:\Users\{username}\AppData\Local\Temp\.
  3. Reinstall posh-git: PowerShellGet\Install-Module posh-git -Scope CurrentUser -Force
  4. Remove exclusion for entire Temp folder, since that's probably a bit too expansive. (You need to keep the first exclusion in place until Defender stops trying to delete ConsoleMode.ps1 every time.)

from posh-git.

oliverlabs avatar oliverlabs commented on June 3, 2024

git-posh-screen

from posh-git.

rbuckton avatar rbuckton commented on June 3, 2024

As a workaround you can add an exclusion in Windows Security for that specific file, though that does potentially weaken the security of your Windows device.

from posh-git.

patridge avatar patridge commented on June 3, 2024

Not that it helps, but this appears to be a botched Defender definition that went out. It appears to affect all sorts of things, like this issue as well as deleting all app shortcuts in the task bar. Here's a thread about it on Reddit.

https://www.reddit.com/r/sysadmin/comments/10ar1vb/multiple_users_reporting_microsoft_apps_have/

And here's an acknowledgement from the M365 folks.

https://twitter.com/MSFT365Status/status/1613871552256155649

from posh-git.

oliverlabs avatar oliverlabs commented on June 3, 2024

Thanks, Adam, @patridge. This worked for me. For those who don't know how to add an exclusion, use the following command:

Add-MpPreference -AttackSurfaceReductionOnlyExclusions "[PATH]"

from posh-git.

patridge avatar patridge commented on June 3, 2024

Ooh...I wonder if that would allow you to preemptively add non-existent files that you plan to have exist soon. That would prevent needing to add exemptions that are more broad than strictly necessary.

Oddly, adding via that system doesn't appear to surface them in the Exclusions page of the Security section of the Windows Settings app. I wonder where those get stored.

from posh-git.

oliverlabs avatar oliverlabs commented on June 3, 2024

Yes, it would. You can add both files and folders to the exception.

from posh-git.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.