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

This forum is for Office365 for LabTech (Ver 2) support. When posting remember to include screenshots of any relevant information.
Post Reply
RSCS
Posts: 16
Joined: Mon Jan 07, 2019 2:31 pm

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

Post 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

User avatar
Cubert
Posts: 1522
Joined: Tue Dec 29, 2015 7:57 pm
Contact:

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

Post 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?

User avatar
Cubert
Posts: 1522
Joined: Tue Dec 29, 2015 7:57 pm
Contact:

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

Post by Cubert »

Also see this post on how to debug scans

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

RSCS
Posts: 16
Joined: Mon Jan 07, 2019 2:31 pm

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

Post 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

User avatar
Cubert
Posts: 1522
Joined: Tue Dec 29, 2015 7:57 pm
Contact:

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

Post 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.

greyxv
Posts: 1
Joined: Sun May 24, 2020 3:39 am

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

Post 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.

Post Reply