diff --git a/Connect_Microsoft_Cloud.ps1 b/Connect_Microsoft_Cloud.ps1 new file mode 100644 index 0000000..cc00947 --- /dev/null +++ b/Connect_Microsoft_Cloud.ps1 @@ -0,0 +1,29 @@ +Set-Location C:\ +Clear-Host + +#We need the module (without the parameter for a specific version) +Install-Module -Name ExchangeOnlineManagement -AllowClobber -Force -Verbose + +#More specific if you want +Install-Module -Name ExchangeOnlineManagement -RequiredVersion 3.0.0 -AllowClobber -Force -Verbose + +#Let's import the module +Import-Module ExchangeOnlineManagement + +#Check the version (if you have not selected a version) +Get-InstalledModule -Name ExchangeOnlineManagement + +#Now we connect to Exchange Online +Connect-ExchangeOnline + +#Install the Azure AD Module +Install-Module -Name AzureAD -AllowClobber -Force -Verbose + +#Let's import the module +Import-Module AzureAD + +#Now we connect to Azure Active Directory +Connect-AzureAD + +Disconnect-AzureAD +Disconnect-ExchangeOnline \ No newline at end of file