This Repository holds the PowerShell Microsoft Graph SDK Device Test Automation Execution Scripts. The scripts have been provided to test a single device, which is initially identified, by specifying the user and then the serial number of the device. The script utilises Microsoft PowerShell and the modules Microsoft Graph SDK and Pester.
The scripts held within this repository have been thourougly tested with PowerShell Version 5.1.19041.2364, Pester Version 3.4.0 and Microsoft Graph SDK version 1.19.0.
The script will run against an a pre-connected Azure Tenant. If a session is not established, the script will prompt the user to provide the Tenant details and enter their credentials. If a different Tenant is to be used, the 'Disconnect-MgGraph' cmdlet should be used, prior to executing the script.
To run this script the user will require delegated access, and will authenticate using their username and password. The user should be familiar with Microsoft Graph Scopes. When establishing a session via the script, the user wil have to have been assigned the correct access permissions to correctly execute the scripts. To validate the scope for the user, run 'Get-MgContext | Select-Object -ExpandProperty Scopes'.
Microsoft Graph Profile - Beta has been used for this script as it provides more fuctions and cmdlets than the default version. This will be automatically loaded when the script executes.
The following intstructions are run against an Andriod Device. The instructions are the same for all devices, except that you will need to change the script for the appropriate device Operating System.
3. Select the user, who you would like to test their device, by copying and pasting into the Input field.
4. Once the device details for the user are displayed, enter the device which you would like to test, by copying and pasting the device ‘Serial number’.
System Under Test is identified prior to each area of test as well as the (b) Pester Describe blocks, (c) Blocks and (d) It statements.
- Passed:
- Failed:
- Skipped:
- Pending:
- Inconclusive: