Get-ADComputer -Filter <string> [-ResultPageSize <int>] [-ResultSetSize <System.Nullable[System.Int32]>] [-SearchBase <string>] [-SearchScope {<Base> | <OneLevel> | <Subtree>}] [-AuthType {<Negotiate> | <Basic>}] [-Credential <PSCredential>] [-Partition <string>] [-Properties <...
//获取用户名//获取DistinguishedName并存储它//获取ComputerNameGet-ADComputer-Filter {eq 浏览1提问于2017-12-06得票数1 回答已采纳 2回答 如何通过Powershell AD获得计算机所有者属性,如电子邮件和帐户名称? 、、 我有一台分配给用户作为managedby的计算机,我想获得JSON格式的列表,其中主机名是键,用户属性是值...
-or- Get-ADUser -filter {(mail -eq "*") -and (sn -eq "Smith")}To get all user objects who have not logged on since January 1, 2007, use the following commands: $logonDate = New-Object System.DateTime(2007, 1, 1) Get-ADUser -filter { lastLogon -le $logonDate }To...
代码语言:javascript 复制 $Servers = (Get-ADComputer -Filter { Enabled -eq $True -and OperatingSystem -like "*Server*" } -Properties OperatingSystem -SearchBase "DC=DOMAIN,DC=com") | Where-Object { Test-Connection $_.Name -Count 1 -Quiet } | Select-Object -ExpandProperty Name 收藏分享票...
Get-ADComputer -filter * -properties operatingsystem,LastLogonDate,canonicalname | select name,canonicalname,operatingsystem,LastLogonDate | Export-CSV c:\computers.csv -NoTypeInformation Export Enabled and Disabled Computers to CSV Earlier, we used filters to search for enabled and disabled computer...
Get-ADComputer[-AuthType <ADAuthType>] [-Credential <PSCredential>]-Filter<String> [-Properties <String[]>] [-ResultPageSize <Int32>] [-ResultSetSize <Int32>] [-SearchBase <String>] [-SearchScope <ADSearchScope>] [-Server <String>] [<CommonParameters>] ...
Example 5: Get all computer accounts using a filter powershell Get-ADComputer-Filter* This command gets all computer accounts. Example 6: Get all computers with a name starting with Computer01 or Computer02 powershell Get-ADComputer-Filter'Name -like "Computer01*" -or Name -like "Computer02...
Get-ADComputer [-AuthType <ADAuthType>] [-Credential <PSCredential>] -Filter <String> [-Properties <String[]>] [-ResultPageSize <Int32>] [-ResultSetSize <Int32>] [-SearchBase <String>] [-SearchScope <ADSearchScope>] [-Server <String>] [<CommonParameters>]Power...
Get-ADComputer[-AuthType <ADAuthType>] [-Credential <PSCredential>]-Filter<String> [-Properties <String[]>] [-ResultPageSize <Int32>] [-ResultSetSize <Int32>] [-SearchBase <String>] [-SearchScope <ADSearchScope>] [-Server <String>] [<CommonParameters>] ...
Get-ADComputer-Filter {OperatingSystem-like'*Windows 10*'} También podemos usar numerosos criterios, como los siguientes, para que todas las máquinas ejecuten Windows 10 u 11. Get-ADComputer-Filter"OperatingSystem -eq 'Windows 10' -or OperatingSystem -eq 'Windows 11'"|ft ...