This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Enumerate USBSTOR: | |
| Get-ItemProperty -path HKLM:\SYSTEM\CurrentControlSet\Enum\USBSTOR\*\* |Select ` | |
| @{ n = 'Vendor'; e= { ((($_.PSParentPath -split '[\\]')[-1] -split '[&]')[-3] -split 'Ven_')[-1] } }, ` | |
| @{ n = 'Product'; e= { ((($_.PSParentPath -split '[\\]')[-1] -split '[&]')[-2] -split 'Prod_')[-1] } }, ` | |
| @{ n = 'Version'; e= { ((($_.PSParentPath -split '[\\]')[-1] -split '[&]')[-1] -split 'Rev_')[-1] } }, ` | |
| @{ n = 'Serial_Number'; e= { ($_.PSPath -split '[\\]')[-1] } }, ` | |
| @{ n = 'Unique_Serial'; e= { if ((($_.PSPath -split '[\\]')[-1]) -like '?&*'){"No"} else {"Yes"} } } | Format-Table | |
| Enumerate MountedDevices: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import csv | |
| import yaml | |
| import argparse | |
| import os | |
| import sys | |
| filenames = [] | |
| def main(): |
OlderNewer