InteractiveSession InteractiveSession InteractiveSession InteractiveSession InteractiveSession Class


Provides Remote Desktop information about the current session.

public : static class InteractiveSession
static struct winrt::Windows::System::RemoteDesktop::InteractiveSession
public static class InteractiveSession
Public Static Class InteractiveSession
// This class does not provide a public constructor.
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)



: This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment.


IsRemote IsRemote IsRemote IsRemote IsRemote

Indicates whether the calling process is running in a Remote Desktop session.

public : static Platform::Boolean IsRemote { get; }
static bool IsRemote();
public static bool IsRemote { get; }
Public Static ReadOnly Property IsRemote As bool
var bool = Windows.System.RemoteDesktop.InteractiveSession.isRemote;
bool bool bool

Contains True if the current process is running in a remote session or False otherwise.


OutputTextBlock1.Text = String.Format("The current session is : {0}", 
    (InteractiveSession.IsRemote ? "Remote" : "Local"));
OutputTextBlock1->Text = "The current session is : " + 
	(Windows::System::RemoteDesktop::InteractiveSession::IsRemote ? "Remote" : "Local");
OutputTextBlock1.Text = String.Format("The current session is : {0}",
    (If(InteractiveSession.IsRemote, "Remote", "Local")))
document.getElementById("IsRemoteOutput").innerText = "The current session is : " +
    (Windows.System.RemoteDesktop.InteractiveSession.isRemote ? "Remote" : "Local");