View cse-configure-ansible-remoting.ps1
Write-Output "Creating directories"
if (!(Test-Path "C:\_maintainer")) {
New-Item -Type Directory "C:\_maintainer"
}
cd "C:\_maintainer"
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1" -OutFile "ConfigureRemotingForAnsible.ps1"
.\ConfigureRemotingForAnsible.ps1 -EnableCredSSP
View create-password.ps1
function New-RandomComplexPassword ($length=12)
{
$Assembly = Add-Type -AssemblyName System.Web
$password = [System.Web.Security.Membership]::GeneratePassword($length,2)
return $password
}
View ps-remoting-example.ps1
# https://blogs.technet.microsoft.com/stefan_stranger/2017/07/31/using-azure-custom-script-extension-to-execute-scripts-on-azure-vms/
Enter-PSSession -ComputerName $comp -Credential $credential -UseSSL -SessionOption (New-PsSessionOption -SkipCACheck -SkipCNCheck)
View bootstrap-w10-miner.ps1
#Requires -RunAsAdministrator
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
& choco install -y sysinternals googlechrome 7zip teamviewer tightvnc notepadplusplus msiafterburner
Invoke-WebRequest -Uri "https://miner.nicehash.com/installer/windows/setup/nhm_setup_2.0.1.2.exe" -OutFile "$env:USERPROFILE\Downloads\nhm_setup_2.0.1.2.exe"
Write-Output "Heads-up, you need display drivers! On nvidia this is 'geforce-game-ready-driver-win10'"
View enable-wsl-feature.ps1
Start-Transcript "C:\enable-wsl-feature.txt"
Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName Microsoft-Windows-Subsystem-Linux
Restart-Computer
Stop-Transcript
View friendly-accommodations-w10-orch.ps1
function Create-Shortcut {
param (
[String]
$target,
[String]
$shortcutFile,
[Switch]
$admin,
View modified-install-sshd.ps1
# @manojampalam - authored initial script
# @friism - Fixed issue with invalid SDDL on Set-Acl
# @manojampalam - removed ntrights.exe dependency
# @bingbing8 - removed secedit.exe dependency
$scriptpath = $MyInvocation.MyCommand.Path
$scriptdir = Split-Path $scriptpath
$sshdpath = Join-Path $scriptdir "sshd.exe"
$sshagentpath = Join-Path $scriptdir "ssh-agent.exe"
View partial-sshd-install.ps1
param (
[String]
$SSHPort = "22",
[String]
$version = "v0.0.20.0",
[String]
$packageName = "OpenSSH-Win64",
View raw-win32-openssh-install.ps1
param (
[String]
$SSHPort = "22",
[String]
$version = "v0.0.20.0",
[String]
$packageName = "OpenSSH-Win64",
View install-sshd.ps1
# @manojampalam - authored initial script
# @friism - Fixed issue with invalid SDDL on Set-Acl
# @manojampalam - removed ntrights.exe dependency
# @bingbing8 - removed secedit.exe dependency
$scriptpath = $MyInvocation.MyCommand.Path
$scriptdir = Split-Path $scriptpath
$sshdpath = Join-Path $scriptdir "sshd.exe"
$sshagentpath = Join-Path $scriptdir "ssh-agent.exe"