Powershell

Description

recetas con powershell
Jesús M
Note by Jesús M, updated more than 1 year ago
Jesús M
Created by Jesús M over 4 years ago
6
0

Resource summary

Page 1

Networking:   # ver la configuración de red actual: Get-NetIPConfiguration -InterfaceAlias LAN   #  ojo con el GW, si ha sido puesto antes por dhcp con PS puede mantener la configuracion del GW. # en ese caso quitar -defaultgateway o ejecutar el script de abajo para borrar el GW. New-NetIPAddress -InterfaceAlias LAN -IPAddress 192.168.10.100 -PrefixLength 24  -DefaultGateway 192.168.10.1   # para borrar la puerta de enlace Get-NetIPAddress -InterfaceAlias LAN | Remove-NetRoute    #ojo poner una ip que no haya estado asignada anteriormente param ([string]$nombre,[string]$ip,[string]$gw) New-NetIPAddress -InterfaceAlias $nombre -IPAddress $ip -PrefixLength 24  -DefaultGateway $gw   # estos comandos ponen el adaptador por dhcp, pero las propiedades del GW se mantienen como estaban. Set-NetIPInterface -InterfaceAlias LAN -Dhcp Enabled   Set-NetIPInterface -InterfaceIndex 8 -dhcp Enabled   # para borrar la puerta de enlace Get-NetIPAddress -InterfaceAlias LAN | Remove-NetRoute  

Page 2

Configuración red en Hyper-V   #Manejo de virtual switch hyperV   Get-NetAdapter # ver adaptadores   Get-VMSwitch # ver virtual switchs   #Crear externo: $net = Get-NetAdapter -name 'Ethernet' New-VMSwitch -name "Internet" -AllowManagementOS $true -NetAdapterName $net.Name   #Crear interno: New-VMSwitch -name "vmsyhost" -SwitchType internal   #Crear privado: New-VMSwitch -name "solovm" -SwitchType private   #Borrar virtual switch: Remove-VMSwitch -Name "solovm" -Force

Page 3

Máquinas virtuales Hyper-V   #Creación de Maquina: New-VM -Name alpine -NewVHDSizeBytes 10gb -NewVHDPath F:\HyperV\VHDs\alpine.vhdx -MemoryStartupBytes 1GB -Generation 1 -SwitchName internetcable   #asignar procesadores Set-VMProcessor -VMName alpine -Count 2   #modificar memoria Set-VMMemory -VMName alpine -StartupBytes 2GB   #añadirle dvd si no lo tiene Add-VMDvdDrive -VMName hypervserver19 -path F:\Isos\alpine-standard-3.10.1-x86_64.iso   #cambiar el dvd Set-VMDvdDrive -VMName test -Path F:\Isos\alpine-standard-3.10.1-x86_64.iso   #Parar maquina: stop-VM -name alpine -force   #Borrar maquina: Remove-VM -Name test -Force

Page 4

Show full summary Hide full summary

Similar

Sistema Operativo
sanjhon06
Law of Tort - General Negligence
Sophie.J.E
A2 Geography- Water Conflicts
sophielee0909
STUDY PLANNER IGCSE
Felixus
French Grammar- Irregular Verbs
thornamelia
Exam 2- High Renaissance/Baroque
Rachel Masingill
Who was to blame for the Cold War?
Will Barnes
GCSE REVISION TIMETABLE
gracemiddleton
Biology (B3)
Sian Griffiths
Causes of World War 1
Rahul Panikker
LINEA DEL TIEMPO DE LA EVOLUCION DEL MICROSCOPIO
valentina brizio