当前位置: 移动技术网 > 科技>操作系统>windows > Nano Server速记

Nano Server速记

2018年08月06日  | 移动技术网科技  | 我要评论

入门参考

1、创建VHD

Import-module .\NanoServerImageGenerator.psm1 -Verbose

New-NanoServerImage -Edition Standard -DeploymentType Guest -MediaPath j:\ -BasePath d:\vm\nano -TargetPath d:\vm\nano\nano.vhd -ComputerName Nano -Package Microsoft-NanoServer-IIS-Package –EnableRemoteManagementPort

 

2、使用VHD创建虚拟机

3、远程管理

A、连接

Set-Item WSMan:\localhost\Client\TrustedHosts "10.168.1.125"

Enter-PSSession -ComputerName "10.168.1.125" -Credential "administrator"

 

B、共享文件夹

参考

 

mkdir c:\temp

(启用文件共享没什么效果)netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=yes

net share ShareTemp=c:\temp /GRANT:EVERYONE`,FULL

 

C、开端口

参考

 

New-NetFirewallRule -Name "MyService" -DisplayName "我的服务" -Protocol TCP -LocalPort 80,8080,3413-3420 -Action Allow -Enabled True

 

 

D、安装NET CORE

参考

./dotnet-install.ps1 -Channel 2.0 -InstallDir C:\cli

IIS

参考

下载安装脚本,执行命令

 

 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网