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

Uninstalling Fonts via Intune #6

Open
Nikita-zt opened this issue Oct 31, 2022 · 2 comments
Open

Uninstalling Fonts via Intune #6

Nikita-zt opened this issue Oct 31, 2022 · 2 comments

Comments

@Nikita-zt
Copy link

Hello Florian,

Thank you for your job, it is fantastic!

Everything works fine, the only problem I have is when I try to remove fonts through Intune - it removes the fonts and registry entries, but I get the following errors (In Intune it is also marked as "Uninstall failed"):

PS>TerminatingError(Remove-Item): "A parameter cannot be found that matches parameter name 'ItemType'."
Remove-Item : A parameter cannot be found that matches parameter name 'ItemType'.
At C:\WINDOWS\IMECache\08964a18-e2dc-4099-9107-e4d60ad53759_1\uninstall.ps1:24 char:70

  • ... "$Path_FontsIntune\Validation$PackageName" -ItemType "file" ...
  • CategoryInfo : InvalidArgument: (:) [Remove-Item], ParameterBindingException
  • FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
    Remove-Item : A parameter cannot be found that matches parameter name 'ItemType'.
    At C:\WINDOWS\IMECache\08964a18-e2dc-4099-9107-e4d60ad53759_1\uninstall.ps1:24 char:70
  • ... "$Path_FontsIntune\Validation$PackageName" -ItemType "file" ...
  • CategoryInfo : InvalidArgument: (:) [Remove-Item], ParameterBindingException
  • FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand

The "Company-Fonts" file is also was not deleted from "Validation" folder.

Another thing I've noticed that the "$Version = "1" " string is missing in uninstall.ps1, or is that correct?

All help is much appreciated!

@Nikita-zt
Copy link
Author

Nikita-zt commented Nov 3, 2022

Ok, it works with:

Remove-Item -Path "$Path_FontsIntune\Validation$PackageName" -Force
instead of:
Remove-Item -Path "$Path_FontsIntune\Validation$PackageName" -ItemType "file" -Force -Value $Version

@tomcollis
Copy link
Contributor

This worked for me. Thank you

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

No branches or pull requests

2 participants