Professional Documents
Culture Documents
Listado Comandos Basicos PowerShell
Listado Comandos Basicos PowerShell
Listado Comandos Basicos PowerShell
4 Restart-Service DHCP
5 Get-ChildItem – Force
Get-ChildItem –Force c:\directory –
6 Recurse
RECOLECTAR INFORMACION
Comando
Get-WmiObject -Class
Win32_NetworkAdapterConfiguration -Filter
IPEnabled=TRUE -ComputerName . | Format-
14 Table -Property IPAddress
Get-WmiObject -Class
Win32_NetworkAdapterConfiguration -Filter
IPEnabled=TRUE -ComputerName . | Select-
Object -Property [a-z]* -ExcludeProperty
15 IPX*,WINS*
Get-WmiObject -Class
Win32_NetworkAdapterConfiguration -Filter
16 "DHCPEnabled=true" -ComputerName .
Get-WmiObject -Class
Win32_NetworkAdapterConfiguration -Filter
IPEnabled=true -ComputerName . | ForEach-
17 Object -Process {$_.EnableDHCP()}
18 Get-PhysicalDisk
GESTION DE SOFTWARE
Comando
(Get-WMIObject -ComputerName
TARGETMACHINE -List | Where-Object -
FilterScript {$_.Name -eq
"Win32_Product"}).Install(\\
19 MACHINEWHEREMSIRESIDES\path\package.msi)
GESTION DE LA MAQUINA
Comando
Start-Sleep 60; Restart-Computer –Force –
22 ComputerName TARGETMACHINE
(New-Object -ComObject
WScript.Network).AddWindowsPrinterConnect
23 ion("\\printerserver\hplaser3")
(New-Object -ComObject
WScript.Network).RemovePrinterConnection(
24 "\\printerserver\hplaser3 ")
25 enter-pssession TARGETMACHINE
RECOLECTAR INFORMACION
Accion
GESTION DE SOFTWARE
Acción
GESTION DE LA MAQUINA
Acción