start-install.psm1
<#
.NOTES ======================================================================== Created by: Byran Schomburg Website: www.schomburg.dev Copyright: (c) 2024 Byran Schomburg. All rights reserved. ======================================================================== .SYNOPSIS Runs the Get-WindowsAutopilotInfo Script with additions .DESCRIPTION This script sets the local administrator to something you would like in case LAPS doesnt work. Additionally you can set a primary DNS address for error free domain joins. The secondary DNS will be set to 8.8.8.8. After that the Script runs the normal Get-WindowsAutopilotInfo script. .INPUTS None, You can't pipe objects to start-install. .OUTPUTS None, start-install doesn't generate any output. .EXAMPLE PS> run-startup #> #TODO: Located in /Azure/start-install/ function start-install { set-executionpolicy Unrestricted # $password = read-host "Password for local Admin" | ConvertTo-SecureString -AsPlainText -Force $password = "101506" | ConvertTo-SecureString -AsPlainText -Force Enable-LocalUser Administrator Set-LocalUser -Name Administrator -Password $password # $index = get-netadapter -name ethernet # $primaryDNS = read-host "Primary DNS address" # Set-DnsClientServerAddress -InterfaceIndex $index.InterfaceIndex -ServerAddresses ("$primaryDNS","8.8.8.8") Install-Script -Name Get-WindowsAutoPilotInfo -force Get-WindowsAutoPilotInfo -online -Assign -reboot } Export-ModuleMember -Function * |