Get-ADComputer -Filter * | select name, Enabled This command will get all computers and limit the output to display the name and enabled properties only. 5. Get All Enabled Computers Get-ADComputer -Filter "Enabled -eq 'True'" This command uses the -filter option to limit the results to...
Get-ADComputer -filter "Enabled -eq 'true'" -properties operatingsystem,canonicalname,LastLogonDate | select name,operatingsystem,canonicalname,LastLogonDate | Export-CSV c:\computers.csv -NoTypeInformation Following are the results for all enabled computers in Active Directory: Export Disabled Comp...
代码语言: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-ADGroup -filter {GroupType -band 0x80000000} Note: To query using LDAP query strings, use the LDAPFilter parameter. Default Value:** Data Type:string Attributes NameValuePSMAML Attribute Required? true required Variable Length? false
-or- Get-ADGroup -filter {GroupType -band 0x80000000}Note: To query using LDAP query strings, use the LDAPFilter parameter.Default Value: **Data Type: stringAttributesExpand table NameValuePSMAML Attribute Required? true required Variable Length? false variableLength Accept wildcard characters?
Wildcards other than*, such as?, are not supported by theFiltersyntax. Напомена To query using LDAP query strings, use theLDAPFilterparameter. Type:String Position:Named Default value:None Required:True Accept pipeline input:False ...
Wildcards other than*, such as?, are not supported by theFiltersyntax. 备注 To query using LDAP query strings, use theLDAPFilterparameter. Type:String Position:Named Default value:None Required:True Accept pipeline input:False Accept wildcard characters:False ...
Enabled: 用户是否启用 MemberOf: 用户所属的组 Get-ADComputer命令用于获取活动目录中的计算机对象属性列表。可以使用该命令获取计算机的名称、操作系统、IP地址、所属组等信息。以下是一些常用的属性: Name: 计算机的名称 OperatingSystem: 计算机的操作系统 OperatingSystemVersion: 操作系统的版本 IPv4Address: 计算...
Type: ADComputer Position: 0 Default value: None Required: True Accept pipeline input: True Accept wildcard characters: False-LDAPFilterSpecifies an LDAP query string that is used to filter Active Directory objects. You can use this parameter to run your existing LDAP queries. The Filter paramete...
Type: ADComputer Position: 0 Default value: None Required: True Accept pipeline input: True Accept wildcard characters: False-LDAPFilterSpecifies an LDAP query string that is used to filter Active Directory objects. You can use this parameter to run your existing LDAP queries. The Filter paramete...