/build/static/layout/Breadcrumb_cap_w.png

Scripting powershell in Windows 10 not working

Hello All,

I have been racking my brains lately trying to get a script to remove OneNote from Windows 10.  However, no matter how hard that I try (even with instructions from Quest), I can't get the script to uninstall OneNote.  

Below is the page that I am referencing:
https://support.quest.com/kace-systems-management-appliance/kb/138389

The weird thing is that if I run the powershell script alone on the PC, it works.  If it is from KACE, it doesn't work.  I am working on the latest version of Windows 10.  

Has anyone run into this issue?  If so, do you have any tips/tricks to figure it out?

3 Comments   [ + ] Show comments
  • Are you running the script from system, logged-in user, or an admin account? I almost always do mine from an admin account. I've never had much luck with system account. - five. 6 years ago
  • I was running from System, but changed it to a domain admin account. That didn't work either. - zgillette 6 years ago
  • In the past, like appliance version 6.5, I was able to execute PowerShell.exe and pass “-command {my command to run}” in the parameters. Recently this doesn’t seem to work. PowerShell appears to run, shows Exit code 0, but none of the expected changes are present.

    I’ll try the batch file and report back. I really prefer to not need to add files to endpoints, even small ones like batch files if I can avoid it. - infinite_e 5 years ago

Answers (1)

Posted by: five. 6 years ago
Second Degree Green Belt
1
If you go to inventory - software and find the OneNote in question, does it have an uninstall command? If you run that command does it work? That's usually how handle an uninstall through scripting. Here is an example of a script that uninstalls CiscoMeeting:


I do not have any examples that I've tested using the powershell method on the K1. I have used powershell on the K2 however with no issues. When I look on the K1, there is a script called "K1000 Enable Detailed DDPE Inventory" that has an example of a powershell script. Maybe you have that one and can check out the details of how it works.

Comments:
  • The only information that I can find is uninstalling it via PowerShell. It is one of the store apps and is installed with the installation of Windows 10. OneNote does not show up in installed software. - zgillette 6 years ago
    • That one is ugly. Every user that logs into windows will have it installed. So you need to either set up "Active Setup" or possibly modify your default user in regedit. If the only user that uses the machine is the one logged in, you can run the script as logged-in user. Just know that anyone else that logs in will have it as well. - five. 6 years ago
      • I'm not worried about this with any new computers, as I have the PowerShell run with the K2000 and that one works just fine. Plus, only one user works with a machine for the life of the machine. I am just working with the ones that have already deployed. - zgillette 6 years ago
  • I figured out the issue, for at least one user. You have to run the script as All Logged In Users. Otherwise it won't work.

    I spent 5 hours working on ripping apart, removing parts, and adding them back into Windows 10 just to get rid of the OneNote portion on the K2000. For some reason they don't give you the availability to do that with OneDrive as well. Why, I have no clue. - zgillette 6 years ago
    • Old post but this one helped. Thanks. Was attempting to remove bundled Win10 apps like Xbox and Mail via PS and running as All Logged in users allowed it to work. - zbowman 4 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ