4. Gestión de archivos en PowerShell para administradores de sistemas

Los sistemas de archivos permiten organizar los datos en los dispositivos de almacenamiento siguiendo una serie de normas y restricciones. Un sistema de archivos se implanta después de crear una partición en un dispositivo de almacenamiento (disco duro, USB, CD/DVD, etc.). La unidad principal de los sistemas de archivos es el archivo, en general, los…
Read more

Windows Post Exploitation Cmdlets Execution (PowerShell)

Presence This section focuses on information gathering about the victim host and the network that it’s attached to. System

WMI

Networking

Users

Configs

Finding important files

Files to pull

Remote system access

Software

Auto­Start directories

Persistance This section focuses on gaining a foothold to re­gain,…
Read more

Ejercicios de PowerShell: crear un diccionario

Windows PowerShell aliases

 

Saving Data to a Text File

The primary use of Set-Content is to write data to a text file. For example, this command writes the text “This is a test” to the text file C:\Scripts\Test.txt:

  Note that this replaces the existing contents of Test.txt with the new text specified in the command. To append text to a file, use the…
Read more

Appending Data to a Text File

One use of the Add-Content cmdlet is to append data to a text file. For example, this command adds the words “The End” to the file C:\Scripts\Test.txt:

  By default Add-Content tacks the new value immediately after the last character in the text file. If you’d prefer to have The End listed on a separate…
Read more