Page 1 of 1

Error 2281 - bad data...the file does not have a '.ps1' extension

Posted: Mon Oct 28, 2019 3:34 pm
by RSCS
When we initiate a scan, each client generates the following error:

Processing [customer] -> Client Failed Update
2281 - bad data or errors returned - Processing -File '-Office365Username' failed because the file does not have a '.ps1' extension. Specify a valid Windows PowerShell script file name, and then try again.

How do I resolve this?
Thanks,
Dean

Re: Error 2281 - bad data...the file does not have a '.ps1' extension

Posted: Thu Oct 31, 2019 1:35 pm
by Cubert
Looks like your username maybe causing an issue. Does it have any odd chars in it? Something that when placed between a set of quotes (" * ") that would otherwise break a call to a powershell script as arguments?

Re: Error 2281 - bad data...the file does not have a '.ps1' extension

Posted: Thu Oct 31, 2019 1:38 pm
by Cubert
Also see this post on how to debug scans

http://support.plugins4automate.com/vie ... 9a905d16cf

Re: Error 2281 - bad data...the file does not have a '.ps1' extension

Posted: Thu Oct 31, 2019 4:06 pm
by RSCS
Thanks Cubert,

Actually, oddly enough, after it shows that error, it continues to process the two clients that we have set up in the plugin. There is an error for both of the clients.
The first one has been in place for a couple of months and appears to still be working. For the second one, it shows all of the O365 Distribution lists with the member accounts. These DL's appear in the plugin for the client but no other information appears. All of the Status detail on the Azure tab is blank or grey, there are no items in Exchange or Licensing. Just the Groups and MSOL Status.
I feel like I have two issues. 1) The error appears for both the working and non-working client. 2) the second client has no account or status info.

There are no other error messages in the debug window.

How do we proceed?
Thanks,
Dean

Re: Error 2281 - bad data...the file does not have a '.ps1' extension

Posted: Fri Nov 01, 2019 1:01 pm
by Cubert
If you would, select only Azure, in the scanner windows and run in debug mode. Then post that here or email it to support@ if you need some privacy. Let us look at debug report.

Re: Error 2281 - bad data...the file does not have a '.ps1' extension

Posted: Tue May 26, 2020 6:50 pm
by greyxv
Hello,

I am running into this issue as well. Here is what I've done so far to troubleshoot.
1. Changed scanner to different devices on different networks and different operating systems.
2. Changed credentials and verified usernames did not have symbols.
3. Verified modules were installed successfully.

I can't even seem to get Azure AD to scan properly. Below is what I get after enabling debug mode.

Thanks for your help.

Starting data collection from Office365
Checking MSOnline Modules are in the 64bit PoSh folder
2 - 1.0.9031.1

Validating script folder is available

Test for MSOLUSERS functions on probe

Found current MSOLUSERS
Executing MSOL User Scans on [1] Clients

Processing [] -> Client Failed Update
2 - bad data or errors returned - Processing -File '-Office365Username' failed because the file does not have a '.ps1' extension. Specify a valid Windows PowerShell script file name, and then try again.
Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

Re: Error 2281 - bad data...the file does not have a '.ps1' extension

Posted: Wed Nov 18, 2020 11:19 am
by aspendora
I'm having the same problem. Was there ever a resolution for this? I sent in a request to support@plugins4automate.com but have not heard back yet.

Re: Error 2281 - bad data...the file does not have a '.ps1' extension

Posted: Wed Nov 18, 2020 1:16 pm
by Cubert
We are looking into this error. Looks like it maybe having issues with command structure now.

I'll post an update as we get them.

Re: Error 2281 - bad data...the file does not have a '.ps1' extension

Posted: Wed Jul 21, 2021 5:39 pm
by rspaulding
I am having this exact same issue also. Are there any updates on this?