Powershell error

Hi @supermanPunch

I’m trying to get ad(active directory) report using powershell but not successfull.
Pls help urgent.

Script:
Get-ADComputer -Filter * -Properties SamAccountName,Name,DNSHostName,DistinguishedName,Enabled,OperatingSystem,Description,whenCreated,LastLogonDate | select SamAccountName,Name,DNSHostName,DistinguishedName,Enabled,OperatingSystem,Description,whenCreated,LastLogonDate | Export-Csv “C:\Users\mitulchoudhary\Documents\Badir_Task\compliance dashboard\compliance dashboard report” -NoTypeInformation

Code made by me:

@NIVED_NAMBIAR maybe you can help

1 Like

@mitul_choudhary The first thing to check would be to execute the Powershell Script in the Powershell editor manually and check if it is giving you the result. If not, then there would be a problem in the Powershell Script, so we can narrow down the problem.

1 Like

Hi @supermanPunch we have tested manually.
Yes we are getting result

@mitul_choudhary Have you checked the IsScript Option and tried it ?Also the type argument can you change it to Object and check if it works

After trying this:

@supermanPunch

Pls revert Urgent…!

Any updates? Did you find a solution?