StackoverFlow!我在找我的代码帮助。它的目的是拿出列出的域名,并向我报告所有用户在域名上的登录时间邮票。
Get_ADUser -Filter * _SearchBase "dc=<nhtool>,dc=<local>" -ResultPageSize 0 -Prop CN,samaccountname,lastLogonTimestamp |
Select CN,samaccountname,@{n="lastLogonDate";e={[datetime]::FromFileTime($_.lastLogonTimestamp)}} |
Export-CSV -NoType "D:\TEMP\<UserTest.csv>"我得到的错误是:
"Get_ADUser : The term 'Get_ADUser' is not recongnized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, of if a path was included, verify that the path is correct and try again. 2) At line:1 Char1: + Get_ADuser -Filter * _Searchbase "dc=,nhtool>,dc=<.local>" -ResultPag..... +Categoryinfo :ObjectNotFound (get_ADuser:String_ [], CommandNotFoundException +FullyQualifiedErrorID : CommandNotFoundException
任何帮助都将是非常感谢的,因为我的新的Powershell!
发布于 2019-11-19 18:32:16
谢谢大家的帮助,"<“函数是抛出我的代码的原因。这是正确的密码,谢谢!
Get-ADUser -Filter * -SearchBase "dc=nhtool,dc=local" -ResultPageSize 0 -Prop CN,samaccountname,lastLogonTimestamp | Select CN,samaccount,@{n="lastLogonDate";e={[datetime]::FromFileTime($_.lastLogonTimestamp)}} |
Export-CSV -NoType "D:\temp\UserTest.csv"https://stackoverflow.com/questions/58940204
复制相似问题