Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear-ProjectDirectories and not only Path #3

Closed
CWolffIF opened this issue Jun 5, 2019 · 1 comment
Closed

Clear-ProjectDirectories and not only Path #3

CWolffIF opened this issue Jun 5, 2019 · 1 comment

Comments

@CWolffIF
Copy link
Member

CWolffIF commented Jun 5, 2019

Hi,

I tried Clear-ProjectDirectories -path C:\DevProjects
but got an error from another path. It seems that the script not only works in the defiend path.

PS C:\WINDOWS\system32> Clear-ProjectDirectories -path C:\DevProjects
Get-ChildItem : Der Zugriff auf den Pfad "C:\WINDOWS\system32\LogFiles\WMI\RtBackup" wurde verweigert.
In C:\Program Files\WindowsPowerShell\Modules\XpandPosh\2.6.1\public\System\Clear-ProjectDirectories.ps1:10 Zeichen:5
+     Get-ChildItem -Include "*.log", "*.bak" -Recurse | Remove-Item -F ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (C:\WINDOWS\syst...es\WMI\RtBackup:String) [Get-ChildItem], UnauthorizedAccessException
    + FullyQualifiedErrorId : DirUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetChildItemCommand
 
Remove-Item : Das Element 
C:\WINDOWS\system32\DriverStore\FileRepository\imdriver.inf_amd64_27487e87368d3ae2\Packages\GenericCorePlugin\x64\Packages_GenericCorePlugin_x64_GenericCorePlugin.dll kann nicht entfernt 
werden: Der Zugriff auf den Pfad wurde verweigert.
In C:\Program Files\WindowsPowerShell\Modules\XpandPosh\2.6.1\public\System\Clear-ProjectDirectories.ps1:15 Zeichen:9
+         Remove-Item -Force -Recurse
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (Packages_Generi...cCorePlugin.dll:FileInfo) [Remove-Item], ArgumentException
    + FullyQualifiedErrorId : RemoveFileSystemItemArgumentError,Microsoft.PowerShell.Commands.RemoveItemCommand
Remove-Item : Das Element 
C:\WINDOWS\system32\DriverStore\FileRepository\imdriver.inf_amd64_27487e87368d3ae2\Packages\GenericCorePlugin\x64\Packages_GenericCorePlugin_x64_Lenovo.ImController.EventLogging.dll kann 
nicht entfernt werden: Der Zugriff auf den Pfad wurde verweigert.
In C:\Program Files\WindowsPowerShell\Modules\XpandPosh\2.6.1\public\System\Clear-ProjectDirectories.ps1:15 Zeichen:9
+         Remove-Item -Force -Recurse
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (Packages_Generi...ventLogging.dll:FileInfo) [Remove-Item], ArgumentException
    + FullyQualifiedErrorId : RemoveFileSystemItemArgumentError,Microsoft.PowerShell.Commands.RemoveItemCommand
......
@apobekiaris
Copy link
Member

Hi,

thnks fixed in 2.9.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants