This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SetDisplayResolution 1024 768 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Host "Disabling Windows Update on $deviceName..." | |
Invoke-Command -Session $session -FilePath .\Disable-WindowsUpdate.ps1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set the Windows Update service to "disabled" | |
sc.exe config wuauserv start=disabled | |
# display the status of the service | |
sc.exe query wuauserv | |
# stop the service, in case it is running | |
sc.exe stop wuauserv | |
# display the status again, because we're paranoid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd C:\EFIESP\temp | |
devcon install netrtwlanu.inf "USB\VID_7392&PID7811" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Invoke-Command -Session $session -FilePath .\Install-WifiDriver.ps1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copy-Item -ToSession $session -Path ".\Driver\" -Destination "C:\EFIESP\temp\" -Recurse -Force -ErrorAction SilentlyContinue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Trust the remote pi and connect to it | |
Write-Host "Configuring WinRM TrustedHosts..." | |
$trustedHosts = Get-Item WSMan:\localhost\Client\TrustedHosts | |
if ($trustedHosts.Value -eq "") { | |
Set-Item WSMan:\localhost\Client\TrustedHosts -Value $ipAddress -Force | |
} | |
elseif (-not $trustedHosts.Value.Contains($ipAddress)) { | |
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "$($trustedHosts.Value),$($ipAddress)" -Force | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Invoke-Command -Session $session -FilePath .\Rename-Device.ps1 -ArgumentList $deviceName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param ( | |
[string][Parameter(Mandatory = $true)] $deviceName | |
) | |
setcomputername $deviceName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$username = "administrator" | |
$password = "your-super-secret-password" | |
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force | |
$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username, $securePassword | |
$pstimeout = New-PSSessionoption -OperationTimeout (1000*60*5) | |
$session = New-PSSession -computer $ipAddress -Credential $cred -ErrorAction Stop -SessionOption $pstimeout |