ForensiT Homepage
Forum Home Forum Home > ForensiT Support > Domain Migration
  New Posts New Posts RSS Feed - Unable to Run Save-AzureADUser Script
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Unable to Run Save-AzureADUser Script

 Post Reply Post Reply
Author
Message
 Rating: Topic Rating: 1 Votes, Average 5.00  Topic Search Topic Search  Topic Options Topic Options
Kamika007z View Drop Down
Newbie
Newbie


Joined: 12 Nov 2021
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kamika007z Quote  Post ReplyReply Direct Link To This Post Topic: Unable to Run Save-AzureADUser Script
    Posted: 12 Nov 2021 at 1:32am
Hello all,

I started test migrating a local (non-domain attached) profile over to AzureAD and upon launching the script "Save-AzureADUser.ps1", on PowerShell (ran as an admin), all I receive are a bunch of errors:

PS C:\users\user\Downloads> .\Save-AzureADUser.ps1
At C:\users\user\Downloads\Save-AzureADUser.ps1:225 char:21
+                 Sign up
+                     ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double
quotation marks ("&") to pass it as part of a string.
At C:\users\user\Downloads\Save-AzureADUser.ps1:237 char:18
+ </button>        </div>
+                  ~
The '<' operator is reserved for future use.
At C:\users\user\Downloads\Save-AzureADUser.ps1:251 char:16
+ </button>      </div>
+                ~
The '<' operator is reserved for future use.
At C:\users\user\Downloads\Save-AzureADUser.ps1:264 char:189
+ ... ata-ga-click="(Logged out) Header, go to Features">Features <span cla ...
+                                                                 ~
The '<' operator is reserved for future use.
At C:\users\user\Downloads\Save-AzureADUser.ps1:264 char:264
+ ... mp-link-symbol float-right text-normal color-fg-muted pr-3">&rarr;</s ...
+                                                                 ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double
quotation marks ("&") to pass it as part of a string.
At C:\users\user\Downloads\Save-AzureADUser.ps1:268 char:167
+ ... ck Link--secondary no-underline f5 Bump-link--hover">Mobile <span cla ...
+                                                                 ~
The '<' operator is reserved for future use.
At C:\users\user\Downloads\Save-AzureADUser.ps1:268 char:242
+ ... mp-link-symbol float-right text-normal color-fg-muted pr-3">&rarr;</s ...
+                                                                 ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double
quotation marks ("&") to pass it as part of a string.
At C:\users\user\Downloads\Save-AzureADUser.ps1:269 char:178
+ ... k Link--secondary no-underline f5 Bump-link--hover">Actions <span cla ...
+                                                                 ~
The '<' operator is reserved for future use.
At C:\users\user\Downloads\Save-AzureADUser.ps1:269 char:253
+ ... mp-link-symbol float-right text-normal color-fg-muted pr-3">&rarr;</s ...
+                                                                 ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double
quotation marks ("&") to pass it as part of a string.
At C:\users\user\Downloads\Save-AzureADUser.ps1:270 char:184
+ ... ink--secondary no-underline f5 Bump-link--hover">Codespaces <span cla ...
+                                                                 ~
The '<' operator is reserved for future use.
Not all parse errors were reported.  Correct the reported errors and try again.
    + CategoryInfo          : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : AmpersandNotAllowed

I have installed the Azure AD Module, but upon running this script, I receive those errors.

Any help or insight would be greatly appreciated.

Thank you.


Back to Top
Support View Drop Down
Moderator Group
Moderator Group


Joined: 09 Nov 2006
Location: United Kingdom
Status: Offline
Points: 1844
Post Options Post Options   Thanks (0) Thanks(0)   Quote Support Quote  Post ReplyReply Direct Link To This Post Posted: 12 Nov 2021 at 8:41am
You have downloaded the html of the web page instead of the text of the script.

When you open the script page on GitHub, click on "Raw".
Back to Top
Kamika007z View Drop Down
Newbie
Newbie


Joined: 12 Nov 2021
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kamika007z Quote  Post ReplyReply Direct Link To This Post Posted: 12 Nov 2021 at 12:35pm
Thank you! That did the trick. I had to copy and paste the raw information into PowerShell rather than running/invoking the .ps1 file from PowerShell itself. The documentation wasn't clear on this for the Personal Edition.

Thank you again!


Edited by Kamika007z - 12 Nov 2021 at 12:37pm
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.

This page was generated in 0.156 seconds.