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 almost 5 years ago
7
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
Rates of Reaction
Evie Papanicola
Maths C4 Trig formulae (OCR MEI)
Zacchaeus Snape
AQA GCSE Biology B1 unit 1
Olivia Phillips
The Cold War: An Overview_2
Andrea Leyden
Mind Maps with GoConqr
Manikandan Achan
GCSE REVISION TIMETABLE
Joana Santos9567
How the European Union Works
Sarah Egan
Theory of Knowledge Essay Preparation
Derek Cumberbatch
Get your grammar right!
Sarah Holmes
General Pathoanatomy Final MCQs (111-200)- 3rd Year- PMU
Med Student