cloud/modules/_oobestartup.psm1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
<#
.SYNOPSIS OSDCloud Cloud Module for functions.osdcloud.com .DESCRIPTION OSDCloud Cloud Module for functions.osdcloud.com .NOTES This module is designed for OOBE .LINK https://raw.githubusercontent.com/OSDeploy/OSD/master/cloud/modules/_oobestartup.psm1 .EXAMPLE Invoke-Expression (Invoke-RestMethod -Uri 'https://raw.githubusercontent.com/OSDeploy/OSD/master/cloud/modules/_oobestartup.psm1') #> #================================================= #region Functions function osdcloud-StartOOBE { [CmdletBinding()] param ( [System.Management.Automation.SwitchParameter] #Install Autopilot Support $Autopilot, [System.Management.Automation.SwitchParameter] #Show Windows Settings Display $Display, [System.Management.Automation.SwitchParameter] #Show Windows Settings Display $Language, [System.Management.Automation.SwitchParameter] #Show Windows Settings Display $DateTime, [System.Management.Automation.SwitchParameter] #Install Azure support $Azure, [System.Management.Automation.SwitchParameter] #Install Azure KeyVault support $KeyVault ) if ($Display) { osdcloud-SetWindowsDisplay } if ($Language) { osdcloud-SetWindowsLanguage } if ($DateTime) { osdcloud-SetWindowsDateTime } osdcloud-SetExecutionPolicy osdcloud-SetPowerShellProfile osdcloud-InstallPackageManagement osdcloud-TrustPSGallery osdcloud-InstallModuleOSD #Add Azure KeuVault Support if ($Azure) { osdcloud-InstallModuleAzAccounts osdcloud-InstallModuleAzKeyVault } #Add Azure KeuVault Support if ($KeyVault) { osdcloud-InstallModuleAzAccounts osdcloud-InstallModuleAzKeyVault } #Get Autopilot information from the device $TestAutopilotProfile = osdcloud-TestAutopilotProfile #If the device has an Autopilot Profile, show the information if ($TestAutopilotProfile -eq $true) { osdcloud-ShowAutopilotProfile $Autopilot = $false } #Install the required Autopilot Modules if ($Autopilot) { if ($TestAutopilotProfile -eq $false) { osdcloud-InstallModuleAutopilot osdcloud-InstallModuleAzureAD osdcloud-InstallScriptAutopilot } } } New-Alias -Name 'Start-OOBE' -Value 'osdcloud-StartOOBE' -Description 'OSDCloud' -Force #endregion #================================================= |