标签:sep quic 虚拟 protoc ps1 ocs str 命令 media
入门参考https://docs.microsoft.com/zh-cn/windows-server/get-started/nano-server-quick-start
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、共享文件夹
参考https://www.cnblogs.com/dotNETCoreSG/p/aspnetcore-2_5-nano_server_on_core.html
?
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、开端口
参考http://www.pstips.net/manage-firewall-using-powershell.html
?
New-NetFirewallRule -Name "MyService" -DisplayName "我的服务" -Protocol TCP -LocalPort 80,8080,3413-3420 -Action Allow -Enabled True
?
?
D、安装NET CORE
参考https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script
./dotnet-install.ps1 -Channel 2.0 -InstallDir C:\cli
IIS
参考 https://www.cnblogs.com/dotNETCoreSG/p/aspnetcore-2_5-nano_server_on_core.html
下载安装脚本,执行命令
?
?
标签:sep quic 虚拟 protoc ps1 ocs str 命令 media
原文地址:https://www.cnblogs.com/QinQouShui/p/9426050.html