Azure Active Directory PowerShell to Manage Microsoft Office 365 | Techi Wiz | Skillshare

Playback Speed


  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Azure Active Directory PowerShell to Manage Microsoft Office 365

teacher avatar Techi Wiz, Solutions Expert in Microsoft Technology

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

12 Lessons (56m)
    • 1. Introduction

      1:52
    • 2. Azure AD Introduction

      3:44
    • 3. Prerequisite & Install AZURE AD PS Module

      2:40
    • 4. Connect to Azure AD PowerShell with M365 Subscription

      3:31
    • 5. Install All M365 Services Modules (To Prepare All in one Scripts)

      2:47
    • 6. All in one PowerShell Script to Connect all M365 Services

      9:15
    • 7. View M365 User Accounts

      4:35
    • 8. Create Single M365 user account

      9:15
    • 9. Create Multiple M365 user Account

      4:12
    • 10. Modify Microsoft Office 365 User Account Properties

      8:07
    • 11. Delete Microsoft Office 365 User Accounts

      3:22
    • 12. Block Microsoft Office 365 User Accounts

      2:18
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

50

Students

--

Projects

About This Class

Advanced Administration of Microsoft Office 365 by using new Azure Active Directory (Azure AD) PowerShell for Automation

You'll learn the power of the new Azure Active Directory (Azure AD) PowerShell to automate & advance CLI administration of Microsoft Office 365 identity and access management.

You'll use the new Azure Active Directory PowerShell for Graph module which is going to replace the old Microsoft Azure Active Directory Module for Windows PowerShell module very soon in the future.

So it's the right time to upgrade yourself if you're going to learn or already managing Microsoft Office 365 environment while working in Server / System Administration profile.

You'll install the prerequisite Azure Active Directory (Azure AD) modules and software and you’ll be able to automate the established PowerShell connection to all Microsoft Office 365 services through the single script. That means no need to enter credentials again & again and save credentials in an encrypted format.

I hope you already love to use PowerShell to automate many tasks in your day-to-day jobs, so you’ll be able to save time and effort as you can do bulk operations while managing Microsoft Office 365 identities.

You'll learn how to Create, Modify, Remove & Block single or multiple users in Microsoft Office 365 through Azure AD PowerShell.

You'll understand and agree that many configuration features and settings are only possible through PowerShell in many Microsoft technologies including Microsoft Office 365. So you should use Azure AD PowerShell because it also provides additional information that you can’t get in the Microsoft 365 Admin center. You can also filter data for more customized reporting of the M365 environment.

After learning, you'll definitely love to manage Microsoft Office 365 environment through CLI by using PowerShell.

Meet Your Teacher

Teacher Profile Image

Techi Wiz

Solutions Expert in Microsoft Technology

Teacher

I have more than 11+ years of IT experience on Microsoft Technologies and also on other technologies required to manage IT infrastructure. Currently, I’m working as a Solution Architect on multiple technologies.

I am certified on below Microsoft and Oracle Cloud technologies:

· Microsoft® Certified Solutions Expert: Cloud Platform and Infrastructure

· Microsoft Specialist: Implementing Microsoft Azure Infrastructure Solutions

· Microsoft® Certified Solutions Associate: Office 365

· Microsoft® Certified Solutions Expert: Server Infrastructure

· Microsoft® Certified Solutions Associate: Windows Server 2012

· Microsoft® Certified IT Professional: Enterprise Desktop SupportSee full profile

Class Ratings

Expectations Met?
  • Exceeded!
    0%
  • Yes
    0%
  • Somewhat
    0%
  • Not really
    0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Introduction: Hello, welcome to this class. And this class you learn advance and institutional Microsoft Office 65 by using a new directory PowerShell module, you will learn the power of the new Azure Active Directory, our cell to automate and end of ansi and IEEE administration now by Bashar Buffett 65, identity and access management, you'll use the new Azure Active Directory Power Cell far ground module, which is going to replace the old Microsoft Azure Active Directory module for Windows PowerShell module very soon in the future. So it's the right time to upgrade yourself, if you are going to learn, are already managing Microsoft Office 365 environment while working in server system Edison profile. So in the stall, the graded quizzes as our active directory modules ends up there and you'll be able to automate that stimulus PowerShell connection to all Microsoft 365 services through the single script admins don't need to enter credentials again and again and save credenza in encrypted format so no one can steal your password. I hope you already love to use PowerShell to automatic many task in your day-to-day jobs. So you will be able to save time and aparts as you can do bulk operation while managing 365 identities. You'll also learn how to create, modify, or remove, and block single or multiple users in the Microsoft Office 65 through Ezequiel do PowerShell, you'll understand and agree that many configuration features and settings only possible through Power Cell in many Microsoft technology, including Microsoft Office 365. So you should use alert AD PowerShell, and because it's also provide additional information that you can't get in the Microsoft 365 Admin Center in Gyu. You can also filter data for more customized reporting up the mth D5 employment. After landing, you will definitely love to manage Microsoft Office 365 in woman through CLI by using PowerShell. Let's start and see you in the class. 2. Azure AD Introduction: Welcome to Azure, Active Directory to Jackson lecture. And this lecture we'll learn about what is Azure Active Directory and what is the use of it. And we should pull can use this within our organization, will also discuss about is different types of license. So let's start it. Azara conduct a SWOT name is Azure AD is developed by the Microsoft and is a Cloud-based Identity and Access Management and services Visit mainly used for the authentic n and authorizes identities. So many cloud-based services like a Microsoft 365 as orbital admin 65, or Internet develop domination application I and many says, well as external applications require authentication mechanism which authenticate the users have to authorized to access the services within the services. If they're going to create the Microsoft 365 tenant, you automatically get those adequate Directory free license to manage the users and groups. And is used by mainly by the IT admins who can use this console to manage the users and groups and also enable the multi-factor authentication. And many app developers can enable single sign-on authentication to allow the users to use the same existing credentials to login on the multiple applications where they have configured to the single sign-on Azure Active Directory. And inside the maximum things to five are as there are dynamics 365, if you're using the service in an already, you are using it as a subscriber. So there is a different type has already license. So there's one alpha a lot actually Directory free license. So it's led the arbitrator to manage the users and groups and the license. And it can also lead to lead the synchronized on-premises Active Directory identities with the Assad actually doctoring in that and we said took n as the basic reports. And can you name the self-service password change for the Cloud users so that they can change the password by providing the security cautions with the multifactor authentication. And the second is Azure Active Directory Premium P1 license. So in addition to the free features, is let a user to access both the on-premise and Cloud resources is a two-way synchronization. And in this, we can also create dynamic groups, self-service group and has been Microsoft Identity Manager and Cloud write-back capabilities, which allow self-service password reset for your on-premises users also. So it would be like a two-way synchronization. If you send the password on the Azure Active Directory, then it will also sync with the On-premise Active Directory. At this, we said was not available in the free license. And 30s Azure Active Directory Premium P2 license. So in Edison to the free and a P1 features for you to provide the risk-based conditional access or your customized application. And for them many critical company data pay as you go feature license. So you can get at is null feature license like the Azure Active Directory, B2C, like a business to customer. So B2C can blow identity and access management solution for that customer facing created applications. So OPT and login on the AD dot portal dot Azure.com, you can see that the actual tree and dashboard console. And from there you can manage the users group, external entities, devices, and the license. And through the Azure AD Connect, you can synchronize the on-premises Active Directory identities with doesn't actually directory. And again, he nibbled up password, they say at a company branding all the settings you can choose from here. And from here you can take that and add information. What is their role is and what the license is assigned. From the console, you can tend to all the settings of a level here. And the fetus is available based on the license, which is assignment. So now I believe that you have understood what is Azure Active Directory. Directory is integrated with the multiple Cloud-based applications. From there these days is authenticated and authorized the use of success. That's it for this lecture. And in next lecture, we will discuss about what is the periodic waste and how to install leather. Actually have two modules. I'll see you in the next lecture. 3. Prerequisite & Install AZURE AD PS Module: Welcome back. In this lecture we'll discuss about how we can connect those electric directory to man as the Microsoft 365 users Grove and license to the Azure Active Directory ourself console. In this course, we'll try to manage the Microsoft 365 users group and the license information through the Azure Active Directory PowerShell module. So let's start it. So there is something that we're excited to connect through the policy. Your system must have a dotnet framework 4.5 audible. And the partial of artisans would be 5.1. And then your system has to have a 64 bit version of Windows, either industry and the server radius and you are using and you must have a mission. Ru must be a member outfits and 65 admin roles so that you can connect without any problem. As we learned earlier, to manage that different, different application in, through the PowerShell, we have to install there my dual that the powers of the module is like a package which contain the all the scripts command littered with a particular applications which you are going to manage that here we need to install the Azure Active Directory parser module. Earlier we had used in the MS Online PowerShell module, which is the older now and it will be depreciated once all the functionality get magnetic to that newer Azure PowerShell module. In this course, we'll use the introductory Dr. models. So let's start at the middle. It's Studio Code. It atomistic level is run as an instructor. If you don't know, start a distributed, then you will get the airline starting the modules. So they inform your earlier in this course, I'll be using Visual Studio code instead of ourselves. You can also check the last section where you can learn about the how you can install the registry record and do the initial setup and instill. If you're not comfortable, you can use the power saliency. The H0 and H1. We need to tag the install module as lower Eddie and press Enter. Now it's asking for the permission to install because if there's an anti-static grocery, so you can pause this and you are sure the PowerShell module has been installed. How are you going to certify that the Azure Active Directory, PaaS and Medina has an installer are how you can check all installed module. So you can type the command get module and fun list available. You will get the all the module you should install on this local system. In here, you can check that that Eddie has no stall and the modulo by sin is inside this program files, Windows, PowerShell modules. And you may also add a phi by running some other AD income are like Get as the reducer. If you press the tab is should come automatically. So after pressing the tab automatically coming, that means that the PowerShell module also has been installed that sit in this axin. Next accelerated connect that to the power cell. See you in the next lecture. 4. Connect to Azure AD PowerShell with M365 Subscription: In this lecture, we'll learn about how we can connect the Azure Active Directory and where it is a different type of assorted in woman based on the reason. So unless started, but I have created a new file it connect to Azure AD inside the Visual Studio Code. And here we can type the command plot example. We need all your dissertation which is created inside that actually directly before that, the command is get as AD user. So this command get Typhon, other end-user and we'll Lytton all the users, but I'm going to execute it. How will you receive adder? It can be read here. You must call the connect elder AD. Come on, Let it be for calling any other commodities. But before I was getting any Azure AD, they did commands. So because you have to connect to Azure AD is a command. An actor has already been getting up above to sign in with my Azure AD credentials to connect it, let me enter my credentials. So now you are getting this information. That means our power Celsius and has been connected to the Azure AD successfully. Now if you are going to run the command git Azure AD user, now it will written all the users. Now you may say OK here. So in this table you can say to connect the normal of 65 worldwide, we are using a command connect hyphen Azure AD azure also has can attend different environment are some countries like as omni, China and farther, some garment organization also like US government, DOD and the GCC High. So what do I do? You are using connect hyphen Azure AD if you're in women so steady in the China, then you will use this command connect hyphen Azure AD hyphen in woman name, and then you have to type them in normal name, isogenic loud, and Sam length towards Germany also, you have to use the Azores Omni Cloud. And for the US government, they had to use a normal name US government. So these are the environments which is separated from the Worldwide. And if you're facing any issue while connecting, those are AD. You may also take the log file. It will record all that it is inside this file. And if you are unable to find the log file via email is so customize the destination locked. But while Kinect came the Azure AD. So I'll be using the connectors ready. You may also use a badminton log file path. And here you can give the path like see them, like connect log. If you're entering something wrong password. The field are going to analyze the log file inside the seat empowers us when I have given the destination to save the file, Let's open it. Here you can find the detailed information of the connection. It's like there's someone on water and our card user canceled authentication. It will help you to find the root cause if you're pressing issue while making the connection between the PowerShell console to the Azure AD. You will notice that before I was getting any as an aqueduct to power cellular commands, I have to enter the credentials in every new power cells assessing. In the next lecture we'll create a process crave variables. Saber Khaldun cells at one time was getting saved in a file, in a secure string. And the same cadences really good to use to authenticate farther multiple Microsoft 365 data services like SharePoint extends and other services to see you in the next lecture. 5. Install All M365 Services Modules (To Prepare All in one Scripts): Hello. So in this lecture, recreate a single powers are scraped through that will connect to all Microsoft 365 services like Azure, Active Directory, Exchange Online, SharePoint Online Microsoft Teams skype for Business. So before you as being either Microsoft 365 services, we have to install their modules. Also, apparently you have installed and only the Azure Active Directory or some modules. And to connect to other services, we have to also install other modules like Microsoft Azure, that tree, which is the MS Online, which is the older PowerShell modules which is still in use and install extend online shop Teams I found online and Skype for Business. Normally, we are using the services. Yeah, So these are the commands which you can use Started module name as already, we already have used this. So now we'll install the MS Online and extended line management microsoft Teams. Let's start the video showed you your power sciencey with administrative privileges. And don't get confused with this theme. I have just installed the PowerShell ISE themes. So you may also install from here I can go to the Vensim you met, I fear theme, PowerShell. So you may set this team to get this kind of interface. But let's start by installing the models. So I have written all the partial command here. So my ask Kristen policy already set to remote sign, and also we have already installed the Azure Active Directory module. So we'll start by installing this Amazon line. Select the line, and then run. Now it's asking for the permission to install I noisy texture source. So just some testing that is. And now it will complete the installers. And likewise I will also start installing off extend on in management. You may install in Mongo by pressing the Run, but I want to show you one by one Is. And the same way for the Microsoft Teams also. Yeah, So far these models is WL and you can install this install module command. But for the SharePoint Online Management sale and for the Skype for Business Day is a complete MSIS had Dev. This you need to download on this system. So these that on our link. So it will open this phase from here, you can download this, these are set point only Madmen itself. And you will get this MSI file. So what you need to download and then SQRT. And let's download now, done it. Extremely common condition and then install this. And the same manner, we will also install the Skype for Business data download. So now all the required modules had been struggling to create an all-in-one script. So now we will start creating All-in-One PowerShell script to connect all these services. 6. All in one PowerShell Script to Connect all M365 Services: Welcome back everyone. So let us start creating this. Well, first of all, we need a very variable. It will store the credentials because we'll use the same credential to authenticate all the services. Let's start by creating a variable. Before that, I will start using the variable username. And here we need to enter our user ID, which says that require admin role. And now we need to save the password. Yeah, So this line, what is doing? A read host will take input as the security string so that whatever we going to tie that will not be visible on the screen. That would look like something like star, star. And we'll convert from the sixth string and then it will save in intact file. So we are giving the command output file and then C and that uses test lab. These are my user ID and the PowerShell script that folder I have created, which I'm using here, and then the particle filename. So one thing I want to tell you about that, why I'm installing inside this uses folder. There is a layer of security if your system is getting used by the other students also. And they don't have admin rights, so they cannot enter in any of those users folder. I'll just show you I have admin rights so I can enter in others user's profile also. But as standard user who doesn't have admin rights, the Canada into any other user profile, you will get the adder, something kind of and this is required administrative list to enter in end-user profile. But that's I. I haven't given the location inside my Users folder, so no one can access that credit sales. You may also do the same, and this will be civilly encrypted format. So if you're thinking that anyone can read this text file and get my password, then it's not possible. I'll show you, Let's run this line. And now it's asking for the input. So let's enter our password here. Now you can see that I'm typing the phosphate is not visible as a normal text. But now let's open the file. This file has been created already. I'm using the same pot email subject from here. Yeah. So this is the file which has been encrypted. Arbitrage is storing the occurred in sales, but let's open it. So you can see that the my password has been saved in interrupted formats if anyone to get this file and also it's very hard for them to do this. And also this distance will not work on any events your system if they copy and paste on their system, so they cannot use this file. So there is a lot of security feature. That's why we are storing the credentials and then comforter farmer with a security. So we save our user ID in a username variable, and also we have saved our password in our index file. Remember that this line will be get as Q2 only one time because we need to store the grid and 71 time until unless he didn't get chance. If you did change, then we need to execute again. Otherwise, I just want to as good Only one time, so I have already executed, so I will just comment it out so that next time it will not get eschewed. It should not ask for the password again and username already I have given here. So once I will start using, I will create a analemma variable, a password, which will pass the password from this file, and then he would convert back on the security string. Yeah, So these are the password variable. V is getting a content from the same file, which I have saved the file and then convert to secure a string if we're putting the intensity and the password variable. And now I'm using a credit sale variable, is creating a new object of automation, PSK and sales type, and is taking that a woman from the variable username from here. And the password is taking from here from this variable. Okay, So now the credential variable is having the both username and password. So now we can use this Katrina said were able to authenticate services. So I'm going to connect the authority. So these are the choline connect to have another dirty and passing this conditional variable is having the username and password here, excreting the connect as a ready command, we have to ask good other than cell. So like the username. And you may also check the username a loop by writing the variable and also the password and lines and the credentials. So now if you look at it and says variable, you'll get that isn't like the username. These are the user ID and the password in the Christian form it. But now we can use these credentials to connect other services like Azure AD. But let us do this line, Connect azure AD then credit sales and the variable name. So we are getting this original. That means it has been connected successfully without any adder. So let's try to connect other. So it says also, look at Endo 35. This is the old modules. Let's connect this with the same credentials file. So we did not get any air here. It means it has been connected successfully. Now let's try to connect by the SharePoint SVO services. And here I'm foster importing the models of how SharePoint Online. And then let's try to connect that to your service and that you allude to be your Bennett NAM, and then hyphen admin dot sharepoint.com and the credentials we are using the same currency is variable, which having the boats username and password. We have not received any error. That means if we have connected successfully to the SharePoint online services, This is the command to connect the Skype for Business Online. Plus we are importing the modules. I've Skype on an connector and then we're creating a variable, which is create the online session with the credentials. And then we'll import that PSS and SSS. The less eschewed all the To line. It will take couple of minutes to get finished. So we can say here, but there is one PSS and has been created with this name. And you can run that connect hyphen Microsoft Teams to connect to that. So let's execute this command also. So now you're getting this information. That means it has been connected the account and moment name and tenant ID, tenant domain. And these commands will use to connect to the Exchange Online has some more manometer. I'm using an extent that some variable to store the PSSM and the contracts and name is Microsoft dot XNA and the connection URI, these are the US and connect and there's a different effect you Island to connect the other main part of the Zuni and the China and the US government and the credit sales. We're using the same variable and authentication on the basic and allow redirection. So one thing that you need to notice that while importing of VSS n e and I'm using a disabled named checking. So disabled them checking. What is that is disable the warning on commandlets, our function name that have not a standard valves are non-essential characters in the novel. Power cells equity check and reach commodities, find the non-standard, then it will prevent from the loading of the system. And we know this, this is the texture source, so we can get the all commands by using the disabled M checking parameter. And these are the actions that are happening continue, if you're getting any error, it will not stop bits let it skewed our bypass that. So we are using this cell and click Continue on the adder, and we are using a one more parameter here is allow clever. So allow global parameters, or I'd wanting mass is about installing JSON, which conflicts about existing commands already installed on a computer, is overriding distinct command that had the same name as commands being installed by this modules or like a force command shell. So let's ask you this. Input PSSM is now creating assess and with the remote model and now our temporary PSS and has been created with this name. And these are the commands available in the SPSS and it can then the almost double the script is ready. So now let's test again. So by opening the new bottles as I'm disclosing this, and I'm starting with Illustrator your code again. And now I'm at is getting cleaved in one go. So it will take the user to input from here. And we have comment out this line because already we have stored the credentials in this file. So every time we don't need to enter the credentials, this is our main goal, right? And then it will take the password and the credentials, and then we'll connect all the services with the same credit sales. So let's execute all in one go. So one by one it will connect to all the services. Yeah. So we did not get any error and it has connected to the other services like Azure Cloud, the other Qt directly and MSN will Services. And then it's guy for a witness. And the same base I'm commands has not been sown here, but it escalated. So now you've had run the command like get as OUD user. And you may get the results. So it's easy. I hope you also found this script very helpful to connect day-to-day all the services. So before running commands for the different recipe says you may connect with all the services in one go and then start using this. So this course used mainly for the Azure Active Directory PowerShell console to manage the OS, uses, groups and license. I had just created the script so that you can use this grape to connect to all the services. So in the next lecture, we'll start using AI. We can view the user's information and how we can clear the new user and modify and delete the user and is stored from there. So see you in the next lecture. 7. View M365 User Accounts: So in this lecture, so videos as electronegative power cell to view the Microsoft 64 user accounts. But let's start the resistor, the record audio parcel LC. Let's create a new file. We have created a new file with a manner that already use this. So before executing any Azure AD rooted commands, so we have to connect the services first, though, I'll use the same script. We can create a layer will connect all Microsoft 365 services with a single script. I 18 acquired token and Azure Active Directory. Not all the services. I will ask you to only this line. But these are the variables as we have created earlier is starting the credentials and we are using the currency is valuable to connect to Azure Active Directory so that we don't have to enter the credentials every time. So let's ask you to do connected successfully. You can see here so far getting the Azure AD users, you need to type the command get Typhon, Azure AD. Now you can get the latter. Boston's coming into pop-up list. It's very helpful to working in this lodge and then use this. And you can make there's the tab with the auto complete. Now you may run this command through and now we're getting all the greeted you this information so that the head of five users can clean they don't woman. So I am getting this information otherwise, if any other environment, if there is a hundreds or thousands USE card, then the all the records will be shown on this screen. So let's suppose that you don't require all users information. You require one leasing Gleeson information, the other commodity you need to use that you do the same get as AD user in function. And then we'll use the pedometer object ID or the ALU, this account, there is a one object ID also in this SID format. Though, you may also use this object ID, but it is hard to remember. So we use this user principal name also, it would be easier. So let's suppose our time ticking for this John Donne and then add a domain name. It's a complete UPN. And then let's execute this command. So now I'm only getting the single user information. But you may notice that two allele you are getting a four columns object ID, display name, User, Principal Name here, and they use a type. So these are the default format which is coming into a table format. If you require all the information now this users, then you may use, you need to use the pipeline feature, Dr pipeline. You need to use the command select. And then you need to enter that star for getting all the information less subscript. Now, the now you can take that. Now we're getting a lot of baloney information part of particular use this by using the selected style. So you're getting extensive poverty, object ID, object type, assigned license and the plants AD Premium services. And we can get the city campaign m. If you have men send this information, you will get definitely in the country, the location. And let's for example, you need to get the all uses information based on some criteria. Bishanka, you need to use some filter. But let's use the command, get tough and other AD user. And then you have the pipeline. But now we need to filter to the result is coming up to the pipeline is a very common. It is a soft phone and email, so use a sham mock. It's recommended that you always use the complete command, which is easier to understand for the next person also. And then we need to enter here the dollar sign and then underscore duty present the current item which coming from the pipeline. I went to check the condition based on the user's location. You need to enter here this property name. You says location. And then need to compare like a equals bq. Are they some amusing for India, then I can use an IAM and now less SQRT. So now I'm not getting all users information. So now I'm getting the using formula n, which is matching the location of India. And if I change this to AU, then I'm getting only one uses conforming sandwich. They use it look as any set to the Australia. Likewise, you might filter the result SPD requirements, and you may get that desired end variously. That's the beauty of the power set to customize their reports with the small tweaks. But that's it for this lecture. In the next lecture, we will learn how to care the QDOT users for the PowerShell, let's say you in that next lecture. 8. Create Single M365 user account: Welcome back. In this lecture, we'll create a single Azure AD user account. And also we'll learn how we can create a multiple user account through the PowerShell script. So let's start it. And we'll start by creating a single digit account. And if you remember the command, that's fine. Otherwise, if you don't remember the command, no problem. We can take the get command or get help to find the amount acidity to the particular technology. Yes. So let's suppose that we need to create the Azure AD account. And we don't know the command, how we can find that. You can use the get command. And then you can mention the particular literate technology to get all the commands missing in this. So let's suppose that Azure AD. And then you can use the star sign. So the commands matching with the prefix and suffix will be visible in that is, yeah, so now you can see there's a lot of commands meshing with the US already is showing on the screen and hear a new collection. You will find this new Azure AD user commandlets going there. And if you're not sure, and what is that commando that animated the perimeters and how we can use this. You can take the help of Get Help command to far this new high-fidelity user will type that get tell new as already. And we'll press Enter. So now you can check that this commands create an ID user, and this is the syntax. The syntax is not required and it's not giving a much information. So if you want to check the examples, how to use this, you can also insert a pedometer examples and press Enter. Now you'll can get the example to create the user has entered use there then display name pentameter and it gives the value that password profile. If you want to set the customized password instead of random and then use the principal name and the county unable to an art and a mailbox, you can check the example. And also you mentioned that he tells information. You may use the full details pedometer also. So you can get the long list and the detailed information you'll get about a parameter also. So you mentioned it here, like this account enable is required or not required, true. And ICT integration requirement is not required for the display name. This is the required you must have if the value too far, these manometer, don't worry, you don't need to check commands here. I will also test the script with this lecture. You can customize while testing on your system. So let's clear the screen by typing in the clear command here. So we will use this PowerShell has already command and you can format it in better way so it would be easier to understand. Yeah. So I will move it up by amateurs in different line that once you moving the biometrics and another line, this will be treated as a new line. And if you're going to execute, this will be counted a new line and this would be it as good as it differently. So I will use this line from the keyboard. So these mountain lions will count as a single line. So let me enter and then mention the same. And let me mention the same for all the new lines so that it can treat it as a single line. So the sign is called back take or backwater. Let's add in the last line of each parameter. Just I did this just for the better formatting now the command, so it would be easier to understand that. And if you want to use in the single line, then you can deal with the sign just and then add all the images in single line. Okay, Let's start it. Sought Nios entity is learning is required a display name. So let's give it a display name, something. So different name would be communist, a noun, the first name and the last name. So I'm just giving a display name as the Endrew rock. And the firstname were to be Andrew. And this number to be a last name. And the user principal name parameter value would be the actual login account, which would be the format of something like Andrew added the domain name which you are using that in my case it would be a techies come and they use location would be like entry code is basically used by the Microsoft 365 services. Like some services are not available for some specific country. So based on that, it could be enable and disable. You can mention this. So I'm using IN, for India. In my case, I'll use the India is a country code IN and the middle nickname you can set this leg Andrew. So you want the count to be enable immediately as you created the account, then you can search through for us and the false fall the notes. So if you said the accounting livable true, that created user account will be active immediately after creation. And the password profile, if you don't specify this parameter, then our random paths for revision debtor. And you can see on the screen, if you want to set a your customized password, then you need to create Passover file variable, and then you need to save the password in a variable unless add a phosphate here. So you need to use this command like a password profile. And this would be a variable which is getting created as a new object. And the type would be off is either shot or pen, dot-dot-dot AAD model password profile. So this variable will get created with this type of object, your manuscript, this line to check the result is select the line and then run the selection. And now you can exclude this variable. Now you can see the we are getting this kind of property which we can set password portions password at next login and then enforce change password policy. And this is a property of a level inside this variable and we need to give the password in this property. So how we can give the value inside this property so far that you can do anything. You can use the same variable password profile. And then I need to add it this variable property of password. Then I'll use this dark. And then I will type the password property here automatically is coming. You can see all the properties here also is coming in that list. So I'm going to use this property to add it and then equals, and then whatever the value you need to give some complex password and then execute it. Now check the password profile variable details, SSQ, the possible file only. And now you can see the password which I have set here is showing in this passport property value. Now boss, what had been said inside the password profile. And so we'll use this variable in the past Jupiter file parameter. So let's ask you, this command is selection completely here, executed. And now you have observed that we're also getting added because before the escalating, any ADA did commands you need to make the connection fast. So you may run the command to connect to hyper nasality. But I have created a single script. Let's met connection from there. So this is the command. It seems like accepting the username and then storing the password credentials. So I need to connect only as already. So I'm selecting this line and then with the credit sales. So our connection has been established. Now we can execute this command. So the selection. Now you can check here the object ID has been created for this user account and this is a display them for limb and the user principal name, this is the login ID. Is the user going to use that? And the password is not visible here because already you have set to customize password. So you will get this password to the user and then you usually will login on the maturity. So he suddenly says as accommodate already enabled. And you may notice that there is some power property and inside that password profile variable, Let's take it again, like the password profile variable and then run on, you know that already we have build a parcel profile. You may also attend the force change password and login if you enable this property. So you generally get a pop up to 10, their password and login. And if you enable this in fortunes password policy, then the user will get a notification to join the agenda buzzword in the current session even though you may edit. So you may identities property also in the same way, like a medicine, the same variable, password, profile, and then use a dot to access this property. And you can type the property, is studying him. And then you can press that them. And immediately you will get this and then you can equal and then you convince them here true. And the same way it can enable further enforce password policy also. Enter. Now unless take the properties. And I again take the all three poverty has been updated. Now let's try to login with a newly created user account credentials. Copy, and append the portal dot office.com. Enter the username, then the login ID and password, and the password which have set here. Now you can take that this is promoting to set a new password immediately. From here we can say the current password and then the new password. Now you can say that we have logged in with this new leaves that account, but there's a non-licensed provided. So that's why there's no services are showing file name. So that's it for this lecture. In the next lecture, we'll create a script tool that we can create a multiple uses account with the same script. So see you in the next lecture. 9. Create Multiple M365 user Account: Welcome back. In previous lecture, we have created a script so that we can create a single as an actuarial to use this. Now we've created a script so that we can create a multivalued just account by saving the all the required information in a CSV format first. So these are discrete farther create a signal as already user. And now I have connected a new file. And this will create a script for the multiple use secan. Any lines would be a common in both scripts. So I will copy this password profile script because I went to the same customize password. And I have said already that uses infamous and any CSV format. This is the details. Check here. Unless open in Excel so that you can get a better view. So this is saved in the CSV format comma separated value. But these are the property name, User Principal Name, and this is a test user 1 day 2, 3, 4, test. And the last name is of user 1234. Like this, I have done that. And the discipline is communist and on both first and last name and the user's location and the male nickname. Select this unit to save the anthropologists account in CSV format. And then we'll get the, the cards from the CSV format. We'll import the CSV details in the variable. Okay, So this is the user list variable in which I have imported the CSV, import CSV, and then path, I'm giving the path where it is saved so you mature and the pod according to your profile. But let's execute this row, then selection. Now after executing this variable, we can get the records. You can say that the cards, so I'm going to write found in the user principal name, property, firstName, lastName, days of the property, and this is the value. So you can check the records accordingly. Yes. You said 1234. So there's a four records and said the CSV willing. So now we need to use the for-each loop. Let's create a new variable here with the name user, and then in, and they use that list. So each on every initially one row when we copied from this user list variable to the new uses variable. So I have prepared the new Azure AD users come on with these parameters already. So this user's new variable content one at a time. Inside that there's the property you can see here. So in one row you will find these property, user principal name, first name, last name. So accordingly, I have used for the display name parameter, the user, and then dark display name. So from here, it will represent the display name, property and whatever their lives, men send that time in the display name. This will take as input parameter. And for the event M I am use the first name and last name for the set name. You can check here. And the user pins per limb, diamonds and the property name, slag or dynamic variable. Yeah, accordingly again, this he says location also select events on a US passport profile. The man nicknamed all that, the guards medicine in that CSV format. And the passive provider I'm getting from here is we have created and the accounting enable I1 that all accounts that we should getting created through the scripts automatically that gets set active state. But now unless eschewed this complete script and a five, This question has infinite list. And you may get that out of all four S2 just created here. The object ID has been created for the uses. And it can get the other test which is mentioned in the CSV format, same entity saved a multiple use regarding the CSV format. In this format with this property name also in predefined. And then you need to import that CSV in a variable. Bump up to that, we can run a foreach loop in that we can give the dynamic variable for each pedometer and the profile for the center customized password. And then you can use that like this way. You can use the script to create a multiple liters account in Active Directory directory for Microsoft 365 services. You may find descriptive day, so stem and see you in the next lecture. 10. Modify Microsoft Office 365 User Account Properties: In this lecture, we'll try to attend the properties of a ZOPA if you'd like to users accounts. So first we'll start with the descending the user properties of a single user. Before that, the commodity inset have one Azure AD user. And then you need to use the animator object ID. And here you can give the object ID of the user account are the UPN new job in its full name. The object ID is generated long name, so it's hard to remember. So you can use that UP and ID and user, user account up zone. Now we need to mention the properties of each need to change, which need to update our example. Let's update the city location. So I'll use the ammeter city. And then you can give here the value of the city. But they for changing the city properties of John user account. So first let's check the user accounts of zone. So for that we need to use the command git hyphen there AT user. And then object ID would be the same. So let's copy invest. And before executing this command, we need connect these power sources and to the Azure AD. But let's ask you the connect script. So I'm using this connect all Microsoft 365 power subscript to connect to all Microsoft Surface Duo app services including Azure Active Directory. So let's set up this. It will take couple of minutes to connect the all the services. After that, we can execute these commands. So our Power cells has done has been connected to the March 12th is active services. So let's execute this command. It has got a new user. Here we are getting only forward properties of the user, but we need the city properties also. You can use the pipeline feature and then you can use the select. And suppose that i1 the display name. And then comma, and I want the properties city. And then let's sketch it. So now we're getting to properties of this user. Display name is showing John week and the city is blank. That means that nothing is set correctly. So now we need to update the city, this user, and also let take the properties of user's location. So that you say they'll continue as any of these user committees sewing Australia, AU. So I'm going to set the city as a Melbourne for this user account. And now let's sketch it. After that, we'll check the result. So we did not get any error. That means that this command has been executed successfully. Now, let's execute this line so that we can get the city is its location and the discipline name of this User Account. Now you can check that the CT or properties of these user account has been updated. But the way we have set, so this command we can use to update the properties of single user account. And let's suppose that if you need to update the common properties of Alibaba, the comments. So far, the egg first we'll get the all user accounts details to that. Get a lawyer AT user. And then we'll use the pipeline. And then we'll use the set hyphen Azure AD user. And the properties which you need to change. I want to change the department properties for all users as a sales. So what will happen? This command, git Azure AD user, it will return all the user's account. And after that, this pipeline will take each user counts as an input for this choline or set hyphen Azure AD user. And in that the department will get changed at a sales. So before executing this command, I went to check. So what is the current department is sewing for these users? Let me mention the comment so that it would be easier to identify. This command is doing what. Let's use the command as your AD user. And then we'll use the select command here so that we can check the Department of this user. So I'll be using display em and then comma and use the department properties also. Now let's ask you this command. So we get the result here. We are getting the display name of all Gertrude uses upon, but the department column and the properties we're getting a blank that he missed. Nothing has been set. So here we are changing the sales department for all the units account. Let's eschewed now, completed successfully. Now let's again this command to check the results. So now you can see that we're also getting the department details with the user's display name. Also, like this way we can change the common properties for all user accounts. So let's clear the screen. So now we need to change the properties, the oven for some specific set of us count. Suppose that the user accounts which uses lowercase n is the US. I want to set the department as a finance. So far that we'll use the command to get the user's account details, get Azure AD user. And then we'll use the pipeline. After that, we'll use the red object. And here we'll put the condition. So we'll use the dollar sign and then does score this denote the current value is getting through the pipeline. Do you know that if you get a lower AD user command is returning ten, hundreds of records, then the, all the records will go through the pipeline one-by-one. So this sign the present, denote the current to a Lewis going through the pipeline. Instead of this also you can write this variable ps current item. So this is the PSI which is showing the current item is going through the pipeline. And then use a dot to get the particular properties. So suppose that I want to check the condition on the basis uses location. So I'll use that uses location. And I wanted to match with like equal until a question would be us. What the red object will do that it will filter the result here which users uses lowercase n is equal to Julius. So if you run these commands, it will return all leaders accounts. And if you run in combination with a red object, then it will filter the results. But here we are getting her results which users look as an SDS. The users look at some properties and not editing the default view. But we can add like you're using a command select. It may use it all the column if you want. Like this. And here I will also use a uses location. Let's execute this command. I can take that uses location. This is coming in the list view. You can also change the view, like the FT on my table view. And now you can check that you said location column also updated. And also let's check what is the current department is going so that we can check the current value. So here we can check that we are getting a salesmen which is set default for all his account. So now we need to change the properties of the department. So let's write the set command and another line, I'll just copy this where we're getting the result to us. And then I'll use the pipeline and then you lose the command set as already user. And then Manson the properties we need to change as a department. And the value which you need to change as finance. I'm sending that about random finance of those users, which uses Luke as an ASE us. Let's run now. See it has finished successfully. Now let's run this command to get the correct result. Now you can check that the user's location offer us, the department has been shown that the finance, if you want to check the difference. Now let's run these commands where we'll get the display name and department of all users. And also mentioned the uses location so that we can take the difference in a better way. I can get the display name and the departments so you can check here, but others country location uses that department is set sales and for the US, it had been changed to finance. So like this way, you can customize the script based on the requirement to change the properties of the Azure Active Directory users. And in next lecture, we will learn how we can delete the user's count through the PowerShell. So I'll see you in the next lecture. 11. Delete Microsoft Office 365 User Accounts: Welcome back. In this lecture, we'll try to delete a single Azure AD user account to the power set. So that's static. So the command to delete the user account is remove, have fun as a reducer. And the same, it will ask for the object ID. Here you can give the object ID of the user count are the UPN Utopians a limb. So I'll use the user account and so on. At the Kivy is the domain which I have.com. So remember that you first connect, those are actually directory. Then you need to run this command. So our user account has been deleted already through these commands and you can delete the single user accounts. Let's suppose that you need to delete the multiple uses con our account, but you can do that. So you can do on things. So first, we need to store all users account in a variable AUD uses, and then get upset AD users and ask you to it. But this video will contain all the zeros account details. And see here. Now we need to care it a for each loop unless they're 10 new variable here. And then in the 18 tree from this week's content, the audios account. So from here on in every loop, one you just account details will be copied from audios to the newly created users in this loop. And here we can write the same common remove Azure AD user. And here we require one lead, the UPN object ID, but this variable content all use the cards, right? So we really require a Utopians one limb. So here what we can do, you can Vensim this user variable. You can use a dot and then Properties Nim that a user principal name. You've got these users has a multiple properties. So from that it will take only the user principal name property. After that, you can execute this command. It will take an input one by one, and if it keep deleting all these account. So I don't want to delete the audio this account in my hand, this final exam. But if you require, you may use this script. And if you don't want to delete all users account, then you can do one thing here. You can filter the result like we used earlier with aware. Based on some condition. You can filter the result like PS item. And then you can mention the properties on which likely uses location. It says location is equal to India number of only the Indian Ocean. Let's execute this audio, this variable. You can check here only the three records from the delegation. So this will get deleted. So like this way, you can use the communist and amp different, different commands to make a complete script for the required task. So also you can take the area. You only get half an Azure AD users to get the user account details. And here we are using the remote user accounts at year. And so VL filtering the results based on some condition and then you're using a foreach loop if you need to use the same command for the multiple uses account, and then you are removing this so you can customize it as per your requirement. That's it for this lecture. And in next lecture, we'll learn how we can block a and block the US account. So see you in the next lecture. 12. Block Microsoft Office 365 User Accounts: In this lecture, we'll learn how we can block the particular user account on multiple user account and we can prevent the access to the Celtics for web services. So let's start it so far that you lose semi-colons set as our AD user. And the object ID. Here let's use the count test user 1. And now let's use the parameter accounting enable. This equator true or false if you're Manson that true. So I've only really get Act 2 if you make the faults occur when you get blocked. So now let's run the command. But before executing this command, you need to first connect those already. So you need to connect these parcels are sent to the Azure Active Directory. And after that, you can execute this command. So that's Christian has been completed successfully. Now that Sigma status by using a Git as a radius here. And we can copy the object ID from here. It's not showing the accounting level properties. So you may use the select star to get the other properties information on this user can. So here you can check the properties. Accounting enable is setting to false. And if this user to login on the material to describe services that he received the error. But now unless second. And let's append the portal dot office.com. And to the linearity. Now it's asking for the password. So now let's use the same password we created earlier. So we use this password while creating this user account and sign in so that you use that really get this kind of error that your account has been locked, contact your support person to unlucky like this way, if you want to prevent the temporary access of the user account, you can do that and far enable, you just have to switch from false to true. Now let's run it. And you may also check the result directly from here in the parser. Now accounting antibodies. So your true if you use the same password to login, now let's enter the password and then sign it. So now evolved to get the two further. And this is the setting we, we said earlier to check the password immediately on the first login. So that's why you're getting this error. So through this command, you can enable or disable the Azara count.