ps/Modules/Cole.PowerShell.Developer/TODO/New-MachineSetup.ps1

41 lines
1.1 KiB
PowerShell
Raw Permalink Normal View History

2023-05-30 22:51:22 -07:00
function New-MachineSetup {
<#
.SYNOPSIS
Things to do when setting up a machine for the first time, in script form
#>
[CmdletBinding()]
param (
)
$logLead = (Get-LogLeadName)
if ((Get-ExecutionPolicy) -ne 'Unrestricted') {
'Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force -Scope LocalMachine; New-MachineSetup;' | Set-Clipboard
Write-Warning "$logLead : You gotta set the execution policy to unrestricted. It's on your clipboard, hit paste and enter, then accept."
return
}
# TODO everything
# setup AWS file
# setup AWS ProfileName
# setup cached AWS ProfileName
# setup CachedCredentials
# setup IE11 nonsense
# setup default browser
(Set-DefaultTLSVersion) | Out-Null
if (!(Set-DefaultNetshURLACLS)) {
Write-Warning "Default NetSH URLACLS not set. Could be a problem? Could already exist? Check with a lead or SRE."
}
if (!(Set-DefaultNetshIPListens)) {
Write-Warning "Default NetSH IP Listens not set. Could be a problem? Could already exist? Check with a lead or SRE."
}
}