a while ago my antivirus (360 total security free version) for some reason flagged the powershell as a virus or something and modified its settings. If I remember correctly it quarantined some file from the powershell. I restored the file and deleted that antivirus but to no avail, since the antivirus modified the powershell, every time I start up my PC the powershell pops up from the task bar with the message below:
Copy-Item : Access to the path 'C:\Windows\system32\powershell.exe' is denied.
At line:1 char:1
+ Copy-Item $Langvejsfra23 -Destination $tyngdepunkt -Recurse -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (C:\Windows\SysW...\powershell.exe:FileInfo) [Copy-Item], Unauthorized
AccessException
+ FullyQualifiedErrorId : CopyFileInfoItemUnauthorizedAccessError,Microsoft.PowerShell.Commands.CopyItemCommand
Copy-Item : Access to the path 'C:\Windows\system32\powershell.exe' is denied.
At line:1 char:1
+ Copy-Item $Langvejsfra23 -Destination $tyngdepunkt -Recurse -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Copy-Item], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.CopyItemCommand
Once the message pops up I just close it and start to use the computer normally. This issue itself doesn't interfere with anything on the pc, it works smoothly and without any problems. But it's just annoying getting this same message over and over again every time I start up my PC. Can someone please suggest what should I do to grant the powershell the permission to access the path it needs on startup?
I tried restoring the quarantined file to its original folder and deleted the antivirus but the issue persists. Now I just use the default Windows Defender.