2
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.

Windows 資格情報をコマンドで削除する

Posted at

Windows 資格情報をまれによく一括削除したくなるのでメモ。
PowerShellとcmdkey.exeを使います。

Adobe CCのやつが行が多くてわかりやすかったのでこれで実験。

cmdkey /list | ForEach-Object{if($_ -like "*ターゲット:*Adobe*"){ cmdkey /delete:($_ -replace ".*ターゲット: ","")}}
  1. cmdkey /listで一覧を出力
  2. ForEach-Objectとif文でターゲット:Adobeが出てくる行を抽出
  3. cmdkey /delete:(略)で(略)の文字列を対象に削除実行
  4. (略)ではターゲット: と日本語で書かれてるやつを削除

参考はこちらのStack OverflowのQA

2
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
2
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?