Link to home
Start Free TrialLog in
Avatar of Gjdalton
Gjdalton

asked on

2 Powershell scripts don't seem able to capture data on all machines

I have 2 different Powershell scripts downloaded from the internet. They work well but only on selected machines. On some machines, they fail to collect any data even though I have physically confirmed the data exists. What could need to be added or adjusted on these machines to allow the scripts to work?

Scripts are attached. I did not create these, they created by some very awesome Powershell programmers on Powershell.com and Reddit.
The long one goes through the steps and it visibly collects the data, I can see where it returns the usernames and the machine names. But then the output is always a noreply-date.csv. It seems like it collects the data but can't put it in the file for some reason.

The shorter one collects the data on  machines  by creating a ps session on that remote computer and putting the data in a file then copying that file back to my machine. It doesn't always collect the data, though. I have confirmed on a few machines that the data exists by going to them and looking but the text file is still blank.

Please let me know what might be causing these issues and any suggestions to get resolve them.

Thanks
GetMappedNetworkPrinters.txt
Getnetworkprinters.txt
Avatar of pjam
pjam
Flag of United States of America image

Possibly "Remote Desktop not Enabled?"
ASKER CERTIFIED SOLUTION
Avatar of Adam Leinss
Adam Leinss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gjdalton
Gjdalton

ASKER

Thank you! Still reviewing answer to see if I can make it work with those settings.
This was very helpful. I tested several machines after installing the psremote-registry piece and they all worked well. I would still like to get the other to work correctly. I have ps-remoting enabled on the machines so I think it is something wrong in the code or some patch on the machines.

Thank you!