3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Powershellコマンドでアプリをアンインストールする

Posted at

PowerShellのコマンドでWindowsにインストールしたアプリをアンインストールする方法を記載します。

アプリをアンインストールするには、そのアプリのIdentifyingNumberが必要になります。以下のコマンドで確認できます。

Get-WmiObject win32_product | where {$_.name -eq "Okta Windows Credential Provider"}


IdentifyingNumber : {9C5398A5-4D4F-488A-BB2A-CE96BDFCE670}
Name              : Okta Windows Credential Provider
Vendor            : Okta
Version           : 1.3.5
Caption           : Okta Windows Credential Provider

インストールやアンインストールはmsiexecコマンドで行います。/xパラメータの後にIdentifyingNumberを付けアンインストールします。

IdentifyingNumberを取得する処理と一緒に書くと以下のようになります。

$oktaCredential = Get-WmiObject win32_product | where {$_.name -eq "Okta Windows Credential Provider"}
msiexec /x $oktaCredential.IdentifyingNumber /quiet /noreboot
3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?