Powershell Flashcards

1
Q

Versión de powershell

A

$PSVersionTable
get-host
$host.Version

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

lista las zonas horarias disponible)

A

Get-TimeZone -ListAvailable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

(enviar el
comando para que se pare el proceso de Powershell al Server01)

A

Invoke-Command -ComputerName Server01

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

(obtiene los
procesos que ocupan en memoria mas de 100MB)

A

Get-Process | Where-Object { $_.WorkingSet -gt 104857600 }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

$Properties = ‘Caption’, ‘CSName’, ‘Version’, ‘BuildType’, ‘OSArchitecture’
Get-CimInstance Win32_OperatingSystem | Select-Object $Properties

A

seria equivalente en Linux a –> uname -a)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

seria equivalente en
Linux a –> ping)

A

Test-Connection 192.168.0.21

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

set-executionpolicy unrestricted

A

para poder ejecutar scripts con extension .ps1 hace falta ejecutar primero el
comando

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

crea un punto de
restauración

A

Checkpoint-Computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

borra contenido de un
objeto

borra el valor de una
propiedad

borra el valor de una
variable

A

Clear-Item

Clear-ItemProperty

Clear-Variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

consulta de usuarios del AD

A

Get-ADUser

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

muestra el histórico de
comandos usados en la
sesió

A

Get-History

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Muestra el directorio actual

A

Get-Location

How well did you know this?
1
Not at all
2
3
4
5
Perfectly