This file contains 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
Command | Shot name | |
---|---|---|
configmaps | cm | |
daemonsets | ds | |
deployments | deploy | |
endpoints | ep | |
events | ev | |
horizontalpodautoscalers | hpa | |
ingresses | ing | |
namespaces | ns | |
nodes | no |
This file contains 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
$MyCert = new-SelfSignedCertificate -CertStoreLocation Cert:\LocalMachine\my ` | |
-DnsName api.vm360degee.com ` | |
-friendlyname api.vm360degree.com ` | |
-NotAfter ( [DateTime]::Now.AddYears(5)) ` | |
-KeyAlgorithm RSA ` | |
-KeyLength 2048 ` | |
-KeySpec Signature ` | |
-Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" ` | |
-KeyExportPolicy Exportable ` | |
-KeyUsage DigitalSignature ` |
This file contains 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
configuration PackageTest{ | |
param( | |
[Parameter(Mandatory)] $Machine | |
) | |
Import-DscResource –ModuleName 'PSDesiredStateConfiguration' | |
node $Machine | |
{ | |
Package PackageExample |
This file contains 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
configuration PackageTest{ | |
param( | |
[Parameter(Mandatory)] $Machine | |
) | |
Import-DscResource –ModuleName 'PSDesiredStateConfiguration' | |
node $Machine | |
{ | |
Package PackageExample |
This file contains 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
Configuration ManagePrintServer | |
{ | |
param ( | |
[string[]]$NodeName = 'localhost' | |
) | |
Import-DscResource –ModuleName 'PSDesiredStateConfiguration' | |
Node $NodeName | |
{ | |
Service StartSpooler |
This file contains 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
Start-Service WinRM | |
$myTrustWinRM = get-Item WSMan:\localhost\Client\TrustedHosts | |
if($myTrustWinRM.Value.Length -eq 0) | |
{ | |
$myNewTrust = "192.168.1.113" | |
Write-Host "new trustedhosts" | |
} | |
else |
This file contains 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
$sw = [Diagnostics.Stopwatch]::StartNew() | |
Import-Module -Name C:\temp\NanoServer\NanoServerImageGenerator | |
# Prepare password as secure string | |
$secAdminPassword = ("Passw0rd"|ConvertTo-SecureString -AsPlainText -Force) | |
# Create Nano image | |
New-NanoServerImage -MediaPath C:\temp -BasePath .\ -DeploymentType Guest -Edition Standard -TargetPath "c:\temp\NanoVM\vmNanoStorage.vhdx" -AdministratorPassword $secAdminPassword -MaxSize 10GB -storage -ComputerName Nano | |
# Create VM | |
$strVM = "Nano" | |
New-VM -VHDPath c:\temp\nanovm\vmnanostorage.vhdx -MemoryStartupBytes 512MB -Name $strVM -Generation 2 |
This file contains 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
# This script is from MSDN | |
Install-WindowsFeatures Containers | |
#Download docker service and client | |
Invoke-WebRequest "https://get.docker.com/builds/Windows/x86_64/docker-1.12.1.zip" -OutFile "$env:TEMP\docker-1.12.1.zip" -UseBasicParsing | |
# Put docker to \Program Files\docker | |
Expand-Archive -Path "$env:TEMP\docker-1.12.1.zip" -DestinationPath $env:ProgramFiles |