Thank you for posting your question on Microsoft Q&A.
You can download and install the Azure AD module from below article,
https://www.powershellgallery.com/packages/AzureAD/2.0.2.140
https://learn.microsoft.com/en-us/powershell/module/azuread/?view=azureadps-2.0
Note: Azure AD PowerShell is planned for deprecation. For more details on the deprecation plans, see the deprecation update. You can start trying Microsoft Graph PowerShell to interact with Azure AD as you would in Azure AD PowerShell. In addition, Microsoft Graph PowerShell allows you access to all Microsoft Graph APIs and is available on PowerShell 7.
If you do not have internet on the machine to download Azure AD module, then you can use below steps to install Azure AD module offline,
- Save-module AzureAD -Path C:\temp
- Get the file copied to machine without internet.
- Run command "Import-module C:\temp\AzureAD"
For AD sync module- this is installed by default when you install AD connect sync tool. If it is not installed, then you can run below command,
"Import-Module –Name "C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync" -Verbose"
Let me know if you have any further questions on this.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.