Tag Info

New answers tagged

0

Export-Csv needs to output a string to the CSV file, and since the Paths property is not a string, PowerShell implicitly calls ToString(), resulting in the string System.Object[] (the type of Paths). Use Select-Object to calculate a semicolon-separated string of the paths, like so: $ht.GetEnumerator() | select Count, @{Name="Paths";e={$_.Paths -join ";"}}, ...


1

If you take a look to sftp manual (sftp(1)) you can see there is a way to perform a ls sorting by mtime (ls -t). So you can run sftp twice: First time you perform a ls -lt (or ls -lrt to reverse order) redirect the output to a file and just read the last line of listing, so you have the filename, and on the second round you can specify the file to download. ...


1

Here is list of all Get-aduser default and extended properties. http://social.technet.microsoft.com/wiki/contents/articles/12037.active-directory-get-aduser-default-and-extended-properties.aspx


3

Try rename field in csv from mail to EmailAddress New-ADUser accepts a property of EmailAddress, but not mail. Some of these correspond to an AD attribute, but not all. New-ADUser https://technet.microsoft.com/en-us/library/ee617253.aspx



Top 50 recent answers are included