Skip to content

Instantly share code, notes, and snippets.

@gryte
Last active September 29, 2015 20:56
Show Gist options
  • Save gryte/ba5d510be3b6b318f7f3 to your computer and use it in GitHub Desktop.
Save gryte/ba5d510be3b6b318f7f3 to your computer and use it in GitHub Desktop.
Microsoft Nano Server - Misc Commands
<#
This is a hodge-podge of various but useful commands that I've discovered
while exploring what nano has to offer. I expected these commands to change and
often.
#>
# Enable powershell remoting if it is not already enabled
Enable-PSRemoting -Force
# You may change "*" to the name or IP of the machine you want to connect to
Set-Item "wsman:\localhost\client\trustedhosts" -Value "*" -Force
# the password is vagrant
$creds = Get-Credential vagrant
# this assumes you are using NAT'd network which is the Virtualbox default
# Use the computername or IP of the machine mand skip the port arg
# if you are using Hyper-V or another non NAT network
Enter-PSSession -Computername localhost -Port 55985 -Credential $creds
# Citation
http://www.hurryupandwait.io/blog/a-packer-template-for-windows-nano-server-weighing-300mb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment