ShellSpells
  • 🧙‍♂️Welcome!
    • ShellSpells
    • FAQs
    • License & Disclaimer
  • 🐧Linux
    • System Ops
      • Transcripts
      • Help
      • System Info
        • Date/Time
        • System Details
        • Patches & Updates
        • Init System Identification
        • Hostname / Host ID
        • Variables
        • Hardware & Resources
      • Filesystem
        • Traverse & Enumerate
        • Drives & Partitions
        • Shares
        • Packages
        • Connected Devices
        • Kernel Modules (Drivers)
      • Users & Groups
        • Enumerate
        • Modify
      • Network
        • Enumerate
        • Modify
      • Scheduled Jobs
        • Enumerate
        • Modify
      • Processes
        • Enumerate
        • Modify
        • Custom Script and Shared Object
        • Process I/O Redirection
      • Services
        • Enumerate
        • Modify
        • Create a Service
      • Startup/Boot Scripts
        • Enumerate
        • Modify
      • Security
        • Antivirus
        • Firewall
        • SSH Keys
      • History & Logs
        • History
        • Logs
    • File Ops
      • Search
        • Filename
        • Content
        • Users (Owners)
        • Time
        • Size
        • Permission
        • Hidden Files
        • Inode
        • Find + Exec
        • Notes
      • Enumerate Metadata
      • Modify Metadata
      • Read Content
      • Modify Content
      • Extract Content
      • Sort / Compare / Count
      • Move
      • Copy
      • Execute
      • Hash
      • Encode/Decode
      • Compress/Decompress
      • Working With Weird Filenames
    • Terminal Ops
      • Keyboard Shortcuts
      • Tmux Shortcuts
  • 🪟Windows
    • System Ops
      • Transcripts
      • Help
      • System Info
        • One-liners
        • Date/Time
        • System Details
        • Hotfixes
        • Domain or Workgroup
        • Data Execution Prevention
        • Variables
        • Hardware & Resources
      • Filesystem
        • Traverse & Enumerate
        • Drives & Partitions
        • Installed Software
        • Drivers
        • Shares
      • Registry
        • Enumerate
        • Modify
        • Forensically Relevant Keys
      • Users & Groups
        • Enumerate
        • Modify
      • Network
        • Enumerate
        • Modify
      • Scheduled Tasks
      • Processes
        • Enumerate
        • Modify
      • Services
        • Enumerate
        • Modify
      • Autorun / Startup
        • Enumerate
        • Modify
      • Security
        • Permissions
          • Enumerate
          • Page
        • Antivirus
        • Firewall
          • Enumerate
          • Modify
        • Audit Policies
        • Remoting
          • Enumerate
          • Modify
          • Registry Locations
        • Stored Credentials
      • Remote Command Execution
      • Active Directory
        • Enumerate
        • Modify
      • History & Logs
        • History
        • Logs
      • PowerShell Config
      • Scripting
      • WMIC Notes
    • File Ops
      • Search
        • Filename
        • Time
        • Size
        • Permissions
        • Attributes
        • Wildcarding
      • Enumerate Metadata
        • One Liners
        • Users (Owners)
        • Timestamps
        • Size
        • Permissions
        • Attributes
      • Modify Metadata
        • Change Owner
        • Timestamps
        • Size
        • Attributes
      • Read Content
      • Modify Content
        • Overwrite
        • Insert
        • Append
        • Replace / Remove
        • Convert Case
        • Alternate Data Streams
      • Extract Content
      • Sort / Compare / Count
        • Sort
        • Count
        • Compare
      • Move
      • Copy
      • Execute
      • Hash
      • Encode/Decode
      • Compress/Decompress
      • Working With Weird Filenames
      • Output Formatting / Filtering
      • File Formatting
      • Operators
  • ⛓️Network
    • Traffic Manipulation
      • iptables
        • Option List
        • General Commands
        • Filter Tables
        • NAT
        • Mangle
        • Filter for SSH Traffic (Example)
      • nftables
    • Packet Capture
      • Syntax
      • TCPDump Examples
    • Packet Analysis
      • Wireshark
  • 🚗Maneuver
    • SSH
    • Control Sockets
    • RDP
    • Windows Port Proxy
  • 🛩️Data Transfer
    • SCP
    • FTP
    • Netcat
      • Netcat Relays
    • Server Interactions
    • Alternate Methods
  • 🪄REGEX
    • Examples
Powered by GitBook
On this page
  • Enumerate
  • Modify
  • DiskPart Commands
  • Registry Locations

Was this helpful?

  1. Windows
  2. System Ops
  3. Filesystem

Drives & Partitions

Enumerate

wmic logicaldisk get name

Lists all drives using WMIC.

fsutil fsinfo drives

Displays drives using FSUtil utility.

Get-PSDrive

Lists drives in PowerShell.

net use

Shows network-mapped drives.

bcdedit /enum all

Lists drives in boot configuration data.

View Drives on machine (includes mapped drives):

Get-WmiObject -Class Win32_LogicalDisk
Get-WmiObject -Class Win32_LogicalDisk -Filter “DriveType=3”

Modify

format <DriveLetter>: /FS:<FileSystem>

Formats a drive with the specified file system (e.g., NTFS, FAT32).

label <DriveLetter>: <NewLabel>

Assigns a new label to a drive.

subst <DriveLetter>: <Path>

Creates a virtual drive that is mapped to a specified folder path.

subst <DriveLetter>: /D

Deletes a previously created virtual drive.

Get-Disk

Retrieves disk information.

Initialize-Disk -Number <DiskNumber>

Initializes a disk, preparing it for use.

New-Partition -DiskNumber <DiskNumber> -UseMaximumSize -AssignDriveLetter

Creates a new partition on a disk and assigns a drive letter.

Format-Volume -DriveLetter <DriveLetter> -FileSystem <FileSystem>

Formats a volume with the specified file system.

Set-Partition -DriveLetter <DriveLetter> -NewDriveLetter <NewDriveLetter>

Changes the drive letter of a partition.

Remove-Partition -DriveLetter <DriveLetter>

Removes a partition from a disk.

DiskPart Commands

diskpart

Launches the DiskPart command-line tool for disk management tasks.

list disk

Displays a list of disks.

select disk <DiskNumber>

Selects a disk for subsequent operations.

clean

Removes all partitions and data from the selected disk.

create partition primary

Creates a primary partition on the selected disk.

format fs=<FileSystem> quick

Formats the selected partition with the specified file system.

assign letter=<DriveLetter>

Assigns a drive letter to the selected partition.

remove letter=<DriveLetter>

Removes the drive letter from the selected partition.

Registry Locations

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem

Contains settings and configurations related to the filesystem, including NTFS-specific settings, file system performance tweaks, and other file system behavior settings.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares

Stores information about shared folders on the system, including the path, share name, and share properties.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

Contains information about user profiles on the system, including the location of user-specific directories and files.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches

Contains settings for disk cleanup of various types of files and data stored on the filesystem.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Ntfs

Contains settings specific to the NTFS file system, such as performance optimizations and security settings.

PreviousTraverse & EnumerateNextInstalled Software

Last updated 1 year ago

Was this helpful?

🪟