1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Windows 11でリモートデスクトップ(RDP)の利用時にWindows資格情報が使えなくなったら

1
Last updated at Posted at 2026-04-12

What's?

「Windows 資格情報」を使うと、接続先とユーザー名・パスワードを設定できます。

これを使うとリモートデスクトップの利用時に指定した接続先に合わせて登録した認証情報が使われるはずなのですが、うまくいかなくなることがあったので回避方法とともにメモしておきます。

なにが起こるのか?

登録した資格情報を使ってリモートデスクトップで接続することを期待すると、こんなエラーで阻まれます。

お使いの資格情報は機能しませんでした

Windows Defender Credential Guard では、保存された資格情報を使用できません。資格情報を入力してください。

個人的に、これが非常に困るケースがありまして、なんとかしなくてはと調べたのがこの記事を書いたきっかけです。

どうやらリモートデスクトップが資格情報を読み取れない問題らしいのですが…。

cmdkeyコマンドを使う

対処方法としてはMicrosoft Store版のリモートデスクトップを使うか、cmdkeyコマンドを使うかの2択のようです。

自分はcmdkeyコマンドを使うことにします。

cmdkey /listで登録されている資格情報の表示。

PS > cmdkey /list

Currently stored credentials:

    Target: WindowsLive:target=virtualapp/didlogical
    Type: Generic
    User: 02vbikfaaqytnqtl
    Local machine persistence

資格情報の登録。

PS C:\Users\vagrant> cmdkey /generic:TERMSRV/<接続先> /user:<ユーザー名> /pass

/passの後ろにパスワードを入力しなかった場合は、コマンド入力後にパスワードを求められます。

指定する場合の書き方。

PS > cmdkey /generic:TERMSRV/<接続先> /user:<ユーザー名> /pass:<パスワード>

登録した資格情報を削除する場合。

PS > cmdkey /delete:TERMSRV/<接続先>

これだけ覚えておけばよいでしょう。

サンプル。

PS > cmdkey /generic:TERMSRV/192.168.79.15 /user:sample-user /pass
Enter the password for 'sample-user' to connect to 'TERMSRV/192.168.79.15':

CMDKEY: Credential added successfully.


PS > cmdkey /list

Currently stored credentials:

    Target: WindowsLive:target=virtualapp/didlogical
    Type: Generic
    User: 02vbikfaaqytnqtl
    Local machine persistence

    Target: LegacyGeneric:target=TERMSRV/192.168.79.15
    Type: Generic
    User: sample-user


PS > cmdkey /delete:TERMSRV/192.168.79.15

CMDKEY: Credential deleted successfully.


PS > cmdkey /list

Currently stored credentials:

    Target: WindowsLive:target=virtualapp/didlogical
    Type: Generic
    User: 02vbikfaaqytnqtl
    Local machine persistence

環境

PS > [System.Environment]::OSVersion

Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.26200.0 Microsoft Windows NT 10.0.26200.0


PS > $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      26100  7920


1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?