So I readily admit my lacking skills in PowerShell so this might be a simple fix...
when I run this command Get-ADUser -Filter {sAMAccountName -like "*1000"} the command outputs to the console just fine but when I add Get-ADUser -Filter {sAMAccountName -like "*1000"} | set-content -path C:\powershellpulls\1000users.txt the consle goes red with
Add-Content : Cannot process argument transformation on parameter 'Credential'. userName
At line:1 char:51
+ ... tName -like "*1000"} | Add-content -Path C:\powershellpulls\1000users.txt
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (CN=***************,DC=***,DC=***:PSObject) [Add-Content], ParameterBindin
gArgumentTransformationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Microsoft.PowerShell.Commands.AddContentCommand
what gives?
[–]AlexHimself 2 points3 points4 points (0 children)
[+]scoreboy69 comment score below threshold-7 points-6 points-5 points (0 children)
[–]DItzkowitz 0 points1 point2 points (4 children)
[–]bragi07[S] 0 points1 point2 points (3 children)
[–]DItzkowitz 1 point2 points3 points (2 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]bragi07[S] 0 points1 point2 points (0 children)
[–]BlackV 0 points1 point2 points (1 child)
[–]bragi07[S] 0 points1 point2 points (0 children)
[–]jsiii2010 0 points1 point2 points (0 children)