In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
One of the requirements we get today is to find the statistics of computer accounts in the specified OU. It turns out that I often use Get-Aduser to find the domain account, and one of the commands I can think of is Get-Adcomputer.
Then can not help but open the www.bing.com to find, generally I am still used to using this search engine. There are not many people playing powershell in China.
Https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-adcomputer?view=winserver2012-ps
These are some examples given by Microsoft officials.
My approach is to first use the following command to see all the properties of a computer account
Get-Adcomputer-Identity computer name-Properties *
It turned out to be a lot, and then I flipped through it and thought that Name and LastLogonDate should be useful. In fact, there are some methods on the Internet, but I just don't bother to use them. Then I generated the following command, which is also very practical.
Get-ADComputer-Filter-SearchBase "ou,dc=, dc=, dc="-Properties that ou= is looking for | Select-Object Name,LastLogonDate | out-file c:\ computername.txt
There are two points to note:
First, you need to use administrator privileges to open powershell, otherwise you cannot write to the local file.
Second, remove the out-file first, look at the results and then generate the file.
Searchbase this parameter does not understand, you can search more, in fact, it is very simple.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.