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
GRE Word of the Day
SAT Prep Group
Biology AQA 3.1.3 Absorption
evie.daines
Biology AQA 3.1.5 The Biological basis of Heart Disease
evie.daines
An Inspector Calls - Themes
Emily Simms
FCE Opposites Practice
miminoma
Psychology flashcards memory
eharveyhudl
“In gaining knowledge, each area of knowledge uses a network of ways of knowing.” Discuss this statement with reference to two areas of knowledge
Julianapabab
Specific topic 7.5 Timber (Stock forms)
T Andrews
Diseño de Software
Verny Fernandez