An open API service indexing awesome lists of open source software.

https://github.com/PowerShellCrack/PSAutopilotOfflineOSDUI

A PowerShell UI used in the MECM Autopilot task sequence
https://github.com/PowerShellCrack/PSAutopilotOfflineOSDUI

Last synced: 4 months ago
JSON representation

A PowerShell UI used in the MECM Autopilot task sequence

Awesome Lists containing this project

README

        

# PSAutopilotOfflineOSDUI
A Autopilot UI used in the MECM task sequence

## Description

A PowerShell driven UI to present options to generate a Autopilot configuration file for Autopilot OSD task Sequence used in baremetal provisioning

## How To Use

Using MDT:
```bash
"%DEPLOYROOT%\tools\%architecture%\ServiceUI.exe" -process:TSProgressUI.exe "%Windir%\System32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -NoLogo -File "%SCRIPTROOT%\Custom\AutoPilotOSDUI.ps1"
```

Using MECM
Copy code in Powershell script

![osd](.images/mecm_osdtasksequence.png)

## What it looks like:

The UI is configurable to meet the needs of the organizations. You can configure the background, foreground and inputs.

![ui](.images/startnodata.png)

![hide](.images/filledindata.png)

![hide](.images/hidealloptions.png)

![hide](.images/advancedoptions.png)

![hide](.images/graycolorerromsg.png)

## Additional Variables

There are some addition variables that need to be set that is not part of the parameters.

```powershell
$AutoPilotProfileCategories = [ordered]@{

}

$languageList = [ordered]@{'os-default'="OS Default";'en-US'="English (USA)";'en-ES'="Spanish (USA)" }

$LogoBase64 = ""
```

The _$AutoPilotProfileCategories_ are the different Autopilot Deployment profiles in your Intune tenant. This is a nested habitable (where one hashtable is the value of another) and they need these properties

Main Hashtable needs a Key; this is the friendly name that is displayed in UI

The value of the main hashtable will need these properties

- **AutopilotProfileName** --> Typically the name of the Autopilot profile.
- **DomainJoinMethod** --> 0 or 1. If hte deployment profile is hybrid then it is _1_. Azure AD joined is _0_
- **CorrelationId** --> this is the guid from the Autopilot Deployment profile. This can be retrieved from either the Intune portal:

![portal](.images/correlationid_portal.png)

or using the module _WindowsAutoPilotIntune_ and running command **Get-AutopilotProfile | ConvertTo-AutopilotConfigurationJSON**

![module](.images/correlationid_module.png)

- **Default** --> True of false (at least one should be true otherwise UI will default to first one in the list)

#an example of what it would look like:

```powershell
$AutoPilotProfileCategories = [ordered]@{
"Modern Device" = @{AutopilotProfileName ="Autopilot Profile for AAD Devices";DomainJoinMethod = 0;CorrelationId='6cc1a6a4-6b3c-471f-a69d-86d1ffe421ec';default=$false}
"Developer Device" = @{AutopilotProfileName ="Autopilot Profile for AAD Devices";DomainJoinMethod = 0;CorrelationId='6cc1a6a4-6b3c-471f-a69d-86d1ffe421ec';default=$false}
"Kiosk Device" = @{AutopilotProfileName ="Autopilot Profile for Kiosk Devices";DomainJoinMethod = 0;CorrelationId='4bfe3b9c-04da-4425-8cc3-70e875f71d71';default=$false}
}
```

$LogoBase64 is a variable that holds an embedded image. This image must be converted to base64. TO do that follow these instructions:
```powershell
[convert]::ToBase64String((Get-Content "\check.png" -Encoding byte))
```

To size the text to fit in script (wrapping):
1. Load the image binary in Notepad++.
2. Reduce the window size of Notepad++ to your preferred size (move the right window margin).
3. Then select all + Ctrl + I (Edit > Line Operations > Split Lines).
4. copy/paste binary back to powershell script

## Advanced Menu
Press _F12_ to initiate the advanced options. Hit again to close the menu

![advanced](.images/advancedoptions.png)

# DISCLAIMER

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.