# Connect to Microsoft GraphConnect-Graph-ScopesUser.ReadBasic.All 查看所有帐户 若要显示具有用户 ID 和用户主体名称的用户帐户的完整列表,请运行以下命令: PowerShell Get-MgUser-All| Select DisplayName,Id,UserPrincipalName 应获取类似于以下内容的信息: ...
Get-MgUser -UserID '<sign-in name of the user account>' | Select DisplayName,UserPrincipalName,AccountEnabled 查看帐户同步状态用户帐户有两个源:Windows Server Active Directory (AD) ,即从本地 AD 同步到云的帐户。 Microsoft Entra直接在云中创建的帐户。可以使用以下命令查找从 本地 AD 同步的帐户。
读取用户属性(包括许可证详细信息)需要User.Read.All权限范围或“获取用户”图形 API参考页中列出的其他权限之一。 PowerShell Connect-Graph-ScopesUser.ReadWrite.All, Organization.Read.All 接下来,使用此命令列出租户的许可证计划。 PowerShell Get-MgSubscribedSku ...
Connect-Graph-ScopesUser.Read.All, Organization.Read.All 若要查看特定用户帐户的许可证详细信息,请运行以下命令: PowerShell Get-MgUserLicenseDetail-UserId"<user sign-in name (UPN)>" 例如: PowerShell Get-MgUserLicenseDetail-UserId"belindan@litwareinc.com" ...
如果您想要變更登錄機碼中的特定專案,您可以使用數種可能的方法之一。 此範例會修改 底下的HKEY_CURRENT_USER\EnvironmentPath專案。Path專案會指定要尋找可執行檔的位置。 使用Get-ItemProperty擷取Path專案的目前值。 加入新的值,並將它與 區隔開;。 搭配Set-ItemProperty指定的機碼、專案名稱和值來修改登錄專案。
{ $slogonevents = Get-Eventlog -LogName Security -ComputerName $DC.Hostname -after $startDate | where {$_.eventID -eq 4624 }} # Crawl through events; print all logon history with type, date/time, status, account name, computer and IP address if user logged on...
Get-WmiObject 是 PowerShell 中的一个命令,用于获取 Windows 管理信息 (WMI) 对象。WMI 是 Microsoft 提供的一种用于管理 Windows 操作系统的标准接口,它允许管理者通过脚本或命令行工具来查询系统信息、执行管理任务以及监控系统状态。 使用 Ge
欺骗凭证提示是一种有效的权限提升和横向移动技术。在 Windows 环境中遇到 Outlook、VPN 和各种其他身份...
Get-User [-Anr <String>] [-Arbitration] [-AuditLog] [-AuxAuditLog] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-IgnoreDefaultScope] [-IsVIP] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-PublicFolder] [-ReadFromDomainController] [-RecipientTypeDetails...
Get-User[[-Identity] <UserIdParameter>] [-Arbitration] [-AuditLog] [-AuxAuditLog] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-IgnoreDefaultScope] [-IsVIP] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-PublicFolder] [-ReadFromDomainController] [-Recip...