Jump to content
  • entries
    122
  • comments
    153
  • views
    67336

Office 365 User Creation and License assignment


Catastrophic Failure

2354 views

 Share

Today, I manage to complete the bellow script, in order some basic Office 365 User Creation and License assignment to be automate with one click.

This script automate execute steps for Office 365 Administrator Tasks.

By choosing only a number, you can manage your Office 365 Tasks.

What do you need to know before you begin?

  • Make sure you have already installed Windows Azure AD PowerShell
  • You must check and be sure your server or your computer has access to the internet

Let’s have a quick look how to execute the script O365Tool_v1.0 on Windows PowerShell and what this script do for us.

  1. Login to your computer with Administrator credentials
  2. Start Windows Azure AD PowerShell “As Administrator”

clip_image0014_thumb.jpg?w=330&h=191

 

3. Next step, copy the script O365Tool_v1.0 on (C:\O365Tool_v1.0) folder or create the O365Tool_v1.0 folder in your preferred destination

clip_image0024_thumb.jpg?w=371&h=132

 

4. Let’s start by running the script from Windows Azure AD PowerShell itself.

In case you get weird error messages when you try to run a script, the reason is only one, security settings built into Windows PowerShell include something called the “execution policy” the execution policy determines how (or if) PowerShell runs scripts. By default, PowerShell’s execution policy is set to Restricted that means that scripts – including those you write yourself – won’t run.

Navigate back to Windows PowerShell and set the Execution policy to unrestricted in order to be able to run the script, in that case, use this command to set your execution policy to RemoteSigned or Unrestricted

 

clip_image0034_thumb.jpg?w=401&h=78

Note: The Set-ExecutionPolicy cmdlet enables you to determine which Windows PowerShell scripts (if any) will be allowed to run on your computer.

Windows PowerShell has four different execution policies:

  • Restricted – No scripts can be run. Windows PowerShell can be used only in interactive mode.
  • AllSigned – Only scripts signed by a trusted publisher can be run.
  • RemoteSigned – Downloaded scripts must be signed by a trusted publisher before they can be run.
  • Unrestricted – No restrictions; all Windows PowerShell scripts can be run
  • The most common (default) way to run a script is by calling it:

PS C:\> & “C:\Admin\My first Script.ps1″

If the path does not contain any spaces, then you can omit the quotes and the ‘&’ operator

PS C:\> C:\Admin\Myscript.ps1

If the script is in the current directory, you must indicate this using .\ (or ./ will also work)

PS C:\> .\Myscript.ps1

 

Create the folders:

Main folder: O365Tool

Subfolder’s: Logs and Exports

 

clip_image0044_thumb.jpg?w=469&h=198

 

In our case scenario we run the script in the current directory “C:\O365Tool_v1.0″ so, we must indicate this using .\ and we click Enter

 

clip_image0055_thumb.jpg?w=549&h=58

 

5. Prepare the CSV file ” the file is included on the script zip”

 

clip_image0065_thumb.jpg?w=558&h=166

 

6. Type your Global Admin credentials, Username and Password in order to login

clip_image0075_thumb.jpg?w=558&h=92

 

7. Our script now it starts running, select an option from the menu. In my case scenario, I will select option 1, to start the creation of the new users and then to proceed with the rest of the options.

clip_image0086_thumb.jpg?w=558&h=115

 

Users are now created:

clip_image0094_thumb.jpg?w=558&h=177

 

Option 2: Set UsageLocation:

clip_image0104_thumb.jpg?w=313&h=464

 

Option 3: as I have only EnterprisePack:

https://catastrophicerrors.files.wordpress.com/2015/02/clip_image0115.jpg

 

Option 5: Export Mailboxes from Office 365:

https://catastrophicerrors.files.wordpress.com/2015/02/clip_image0124.jpg

 

Option 6: The script has a timer for how long the script is execute:

https://catastrophicerrors.files.wordpress.com/2015/02/clip_image0134.jpg

 

Enjoy…

Download the Script here: https://gallery.technet.microsoft.com/Office-365-User-Creation-b8e48121

 Share

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...