#Login with AzureAD
Connect-AzureAD
#Find MSGraph Module.
Find-Module -Name MS*
#Install MSGraph Modules
Install-Module MSGraph
Install-Module MSGraphAPI
#Download and Extract Intune_PowerShell_SDK
https://github.com/Microsoft/Intune-PowerShell-SDK
sl C:UserskhaliDownloadsCompressedIntune-PowerShell-SDK_v6.1811.0.3-previewReleasenet471
Import-Module .Microsoft.Graph.Intune.psd1
sl C:UserskhaliDownloadsCompressedIntune-PowerShell-SDK_v6.1811.0.3-previewReleasenetstandard2.0
Import-Module .Microsoft.Graph.Intune.psd1
# login using browser aka.ms/devicelogin using code
Connect-MSGraph
Accept Org Consent……………..
Get-Command -Module Microsoft.Graph.Intune
Get-command Get-DeviceAppManagement_MobileApps
Get-DeviceManagement_DeviceConfigurations
#Get a filtered list of applications and select only the “displayName” and “publisher” properties:
Get-DeviceAppManagement_MobileApps -Select displayName, publisher
#Create a web application
$bingWebApp = New-DeviceAppManagement_MobileApps -webApp -displayName ‘Bing’ -publisher ‘Microsoft Corporation’ -AppUrl ‘https://www.bing.com’
#Update the web application that we created in the ‘Creating objects’ section:
$bingWebApp | Update-DeviceAppmanagement_MobileApps -webApp -displayName ‘Bing Search’
#Delete the web application that we created in the ‘Creating objects’ section:
$bingWebApp | Remove-DeviceAppmanagement_MobileApps
#Lock a managed device:
# Get a device to lock
$allDevices = Get-DeviceManagement_ManagedDevices
$deviceToLock = $allDevices[0]
# Lock this device
$deviceToLock | Invoke-DeviceManagement_ManagedDevices_RemoteLock
# Get a device to Wipe
$allDevices = Get-DeviceManagement_ManagedDevices
$deviceWipe = $allDevices[0]
# Lock this Wipe
$deviceToWipe | Invoke-DeviceManagement_ManagedDevices_Wipe
#there are too many parameters to use in Use_cases.
XXXX = Actions | Just tab and change mode of command.
# Get a device to XXXX
$allDevices = Get-DeviceManagement_ManagedDevices
$deviceXXXX = $allDevices[0]
# Device with this XXXX
$deviceToXXXX | Invoke-DeviceManagement_ManagedDevices_XXXX