- How to install AzureAD module without internet connection
- Download nupkg file from PowerShell Gallery
- for module that has dependences, you can download all nupkg files into same folder
- copy nupkg file to a dedicated folder
- Assuming you have NuGet available, run "Register-PSRepository -Name <pickAName4YourRepository> -SourceLocation <absolute path to nupkg file>"
- You can now "find-module -repository <repositoryName>"
- "Install-Module -Name <moduleName>"
- placeholder
- Install modules behind company proxy
- run below as admin
- [System.Net.WebRequest]::DefaultWebProxy.Credentials = Get-Credential
- [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
- ODATA filter syntax
- Get-AzureADUser -Filter "proxyAddresses/any(c:c eq 'smtp:user@domain.com')"
- Get-AzureADUser -Filter "Department eq 'HP'"
- Get-AzureADDirectoryROle -filter "DisplayName eq 'application administrator'"
- Find reference on Oasis website
- placeholder
- Connect to graph behind proxy
# [NOTE] Set up proxy. Below works for PS 5
[System.Net.WebRequest]::DefaultWebProxy.Credentials = Get-Credential
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# Powershell 7 is using [System.Net.HttpWebRequest]::DefaultWebProxy instead of [System.Net.WebRequest]
[System.Net.HttpWebRequest]::DefaultWebProxy = New-Object System.Net.WebProxy($null)
# this may work in companies where it can authenticate automatically
[System.Net.HttpWebRequest]::DefaultWebProxy.Credentials = Get-Credential
# Prompt for credential in companies that needs authN to use proxy
[System.Net.HttpWebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
# this can be used when proxy uses your default credential (it could be your domain credential, it could be your Azure cendenital, depending on your environment)
- placeholder