'service is stopped but still not able to run copy-item

I have verified that the service is in stopped status.

I have also verified that no process is being used by the file E:\folder\file.exe using below cmdlets which is returning blank output.

$lockedFile='E:\folder\file.exe'
Get-Process | foreach{$processVar = $_;$_.Modules | foreach{if($_.FileName -eq $lockedFile){$processVar.Name + " PID:" + $processVar.id}}}

However, I am still not able to run the below cmdlet:

copy-item e:\newfolder\file.exe e:\folder

The above cmdlet is generating below error:

The process cannot access the file 'E:\folder\file.exe' because it is being used by another process.
+ CategoryInfo          : NotSpecified: (:) [Copy-Item], IOException
+ FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Commands.CopyItemCommand


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source