

- #How can i use long name for usb disk name in mac how to
- #How can i use long name for usb disk name in mac code
There are a couple ways we can get this data. To get this information, all we need Windows PowerShell to do is start from the USBSTOR key, recurse down two subkeys, and grab the FriendlyName property. Now we can see that a “SanDisk U3 Cruzer Micro USB Device” was used on this machine. When we dig deeper, we find a FriendlyName property that is easily readable. I know what you are thinking: “Whoever owns this machine is not very security conscience!”īy looking at the subkey names, we can get an idea about what kind of storage device was used, but the data isn’t easily readable. We see here that 15 different USB storage devices have been used on this machine. When we expand the USBSTOR key, we see all the USB storage devices that have been used on the computer. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USBSTOR When a USB storage device is inserted into a machine, the USBSTOR key is created in the registry, and everything the operating system needs to know about that storage device is contained in that key. “How do we find out if a USB storage device has been connect to a computer?” you ask. The need came up to see if the users are playing by the rules and Windows PowerShell was the answer to that need. Therefore, users are told to simply not use USB storage devices.

We could disable USB ports all together, but that would eliminate the ability to use other USB devices. With my customers being in the public sector, security is a top priority, and USB storage devices are not allowed.
#How can i use long name for usb disk name in mac code
However, USB storage devices are a popular vector bad guys use to get nefarious code onto a machine. They allow you quickly connect and use accessories such as mice, keyboards, and storage devices, just to name a few. USB ports are an awesome resource to any computer. Jason also actively participates in the Charlotte PowerShell Users Group. It does not matter if it is related to Exchange Server. His primary job is supporting Exchange Server, but he jumps at the opportunity to flex his Windows PowerShell muscles to resolve any issue that may come up. Jason Walker is a premier field engineer (PFE) at Microsoft, and he supports customers in the public arena. Today’s blog is a result of that conversation.

I encouraged him to write a guest blog about the script. I asked him what cool things he was doing with Windows PowerShell, and he discussed a script he had recently written. I was talking to Jason Walker at the Charlotte Windows PowerShell User Group the other day. Microsoft Scripting Guy, Ed Wilson, is here.
#How can i use long name for usb disk name in mac how to
Summary: Microsoft premier field engineer, Jason Walker, shows how to use Windows PowerShell to get a history of USB drive usage.
