Anyone have any Powershell to remove quicktime
-
So I'm looking to remove good old Quicktime from of our systems, and I'm getting there, but I'd rather use something already built.
If it exist.
-
Something like this?
$quicktime = Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -match "Quicktime"} $quicktime.Uninstall()
-
Something like that, but it doesn't find Quicktime.
Which I was looking at the same thing. Maybe my system, checking with a counter part to see if it list it.
-
I think I see the issue, double-quotes.
Single quotes found the application, testing now.
-
So here's the solution.
$quicktime = Get-WmiObject -Class Win32_Product | Where-object { $_.name -match 'Quicktime'} $quicktime.Uninstall()
Thanks for the assist @coliver
-
@DustinB3403 said in Anyone have any Powershell to remove quicktime:
So here's the solution.
$quicktime = Get-WmiObject -Class Win32_Product | Where-object { $_.name -match 'Quicktime'} $quicktime.Uninstall()
Thanks for the assist @coliver
Anytime.
-
I only found it on one computer, so I just removed it by hand
-
@DustinB3403 said in Anyone have any Powershell to remove quicktime:
So here's the solution.
$quicktime = Get-WmiObject -Class Win32_Product | Where-object { $_.name -match 'Quicktime'} $quicktime.Uninstall()
Thanks for the assist @coliver
After I run that, I'm getting an error: "You cannot call a method on a null-valued expression."
Any ideas? I know less than jack shit about PS, I'm sure I'm missing something painfully obvious.
-
@RojoLoco said in Anyone have any Powershell to remove quicktime:
@DustinB3403 said in Anyone have any Powershell to remove quicktime:
So here's the solution.
$quicktime = Get-WmiObject -Class Win32_Product | Where-object { $_.name -match 'Quicktime'} $quicktime.Uninstall()
Thanks for the assist @coliver
After I run that, I'm getting an error: "You cannot call a method on a null-valued expression."
Any ideas? I know less than jack shit about PS, I'm sure I'm missing something painfully obvious.
It probably didn't find an object named Quicktime would be my guess. Run the first command by itself to see it returns anything.
-
It appears to only work when run locally, which if you're attempting to remotely push it, might not work.
I'm looking at other solutions as well.
-
@DustinB3403 said in Anyone have any Powershell to remove quicktime:
It appears to only work when run locally, which if you're attempting to remotely push it, might not work.
I'm looking at other solutions as well.
Was there an error? Should work remotely as well.
-
No output on my co-workers system from his side, the application just remained.
-
@coliver said in Anyone have any Powershell to remove quicktime:
@RojoLoco said in Anyone have any Powershell to remove quicktime:
@DustinB3403 said in Anyone have any Powershell to remove quicktime:
So here's the solution.
$quicktime = Get-WmiObject -Class Win32_Product | Where-object { $_.name -match 'Quicktime'} $quicktime.Uninstall()
Thanks for the assist @coliver
After I run that, I'm getting an error: "You cannot call a method on a null-valued expression."
Any ideas? I know less than jack shit about PS, I'm sure I'm missing something painfully obvious.
It probably didn't find an object named Quicktime would be my guess. Run the first command by itself to see it returns anything.
After running the first part, it just goes back to the prompt, so I guess it's all gone. I would have sworn that the boss wouldn't have gotten around to uninstalling it yet (used PDQ inventory last week to find all the quicktime. I manually uninstalled 3, the boss was #4.)
-
@RojoLoco said in Anyone have any Powershell to remove quicktime:
@coliver said in Anyone have any Powershell to remove quicktime:
@RojoLoco said in Anyone have any Powershell to remove quicktime:
@DustinB3403 said in Anyone have any Powershell to remove quicktime:
So here's the solution.
$quicktime = Get-WmiObject -Class Win32_Product | Where-object { $_.name -match 'Quicktime'} $quicktime.Uninstall()
Thanks for the assist @coliver
After I run that, I'm getting an error: "You cannot call a method on a null-valued expression."
Any ideas? I know less than jack shit about PS, I'm sure I'm missing something painfully obvious.
It probably didn't find an object named Quicktime would be my guess. Run the first command by itself to see it returns anything.
After running the first part, it just goes back to the prompt, so I guess it's all gone. I would have sworn that the boss wouldn't have gotten around to uninstalling it yet (used PDQ inventory last week to find all the quicktime. I manually uninstalled 3, the boss was #4.)
Or that it was installed with a different name. That's the function of the -match switch. It must be exactly 'Quicktime' or it won't assign anything.
-
If you are working remotely, you can try using WMI to get the actual name (and uninstall the application for that matter).
https://community.spiceworks.com/how_to/179-using-a-command-line-to-uninstall-software-on-remote-pcs
They actually deal with Quicktime as an example on that walk-through.
-
OK so the powershell method does work remotely, when you kill the quicktime process.
Updated PS1.
Stop-Process -name QuickTimePlayer $quicktime = Get-WmiObject -Class Win32_Product | Where-object { $_.name -match 'Quicktime 7'} $quicktime.Uninstall()