Set-Location (Get-Item $(fzf)).Directory.FullName
<# | |
.SYNOPSIS | |
Install all updates available via SCCM and WAIT for the installation to finish. | |
.PARAMETER Computer | |
the computer to install updates on | |
.OUTPUTS | |
a object containing information about the installed updates and the reboot state (if a reboot is required or not) |
# NuGet package provider. Do this early as reboots are required | |
if (-not (Get-PackageProvider -Name NuGet -ErrorAction SilentlyContinue)) { | |
Write-Host "Install-PackageProvider" | |
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope AllUsers -Confirm:$False | |
# Exit equivalent | |
Invoke-Reboot | |
} |
<# | |
.SYNOPSIS | |
BoxStarter script to configure Windows 10 development PC. | |
.DESCRIPTION | |
You might need to set: | |
Set-ExecutionPolicy RemoteSigned | |
Set-ExecutionPolicy Unrestricted | |
Set-ExecutionPolicy Bypass |
choco install pwsh -y | |
choco install ripgrep -y | |
choco install vscode -y | |
Get-WindowsCapability -Online | Where-Object {$_.Name -like 'OpenSSH*'} | Add-WindowsCapability -Online | |
Start-Service sshd | |
Set-Service sshd -StartupType Automatic | |
Stop-Service sshd |
choco install boxstarter -y
function Get-EvilCmdLet { | |
[CmdletBinding()] | |
param( | |
[ValidateSet('A', 'B')] | |
$Category | |
) | |
Write-Output "= Get-EvilCmdLet =" | |
Write-Output "* PSBoundParameters" | |
$PSBoundParameters.Keys | % { |
function Add-TrustedHostDownloadSite { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $true)] | |
[string]$ServerName, | |
[Parameter(Mandatory = $false)] | |
[string]$Domain = "myorg.somedomain" | |
) | |
Push-Location |
param( | |
[Parameter(Mandatory = $False)] | |
[int]$NumberOfProcesses = 1, | |
[Parameter(Mandatory = $False)] | |
[switch]$IncludeMicrosoftProcesses, | |
[Parameter(Mandatory = $False)] | |
[switch]$RequirePath, |