New-Partition assignes driver letter to mount point after reboot.

Trying to create a series of mount points using powershell on Server 2012 R2. When I have used diskpart in the past I could initialize the disk, create a partition, format a volume and assign a mount point without assigning a driver letter to the drive.
When I try to do the same thing in Powershell on Server 2012 R2, everything looks great until I reboot. Every partition I created and assigned as a mount mount gets a driver letter added to it... I am using mount points to avoid drive letters. Is there a way
to prevent this behavior.  The following is an example:
Get-Disk 3 | Initialize-Disk -PartitionStyle GPT
Get-Disk 3 | new-Partition -UseMaximumSize -AssignDriveLetter:$False | Format-volume -confirm:$False
Add-Partitionaccesspath -DiskNumber 3 -Partition 2 -AccessPath c:\someFolder
Everything looks good at this point with no driver letter assigned. Rebooting adds a driver letter to the volume with no impact on the mount point... Is there a way to suppress the driver letter assignment?

Figured it out... It appears that this part works fine:
Get-Disk 3 | Initialize-Disk -PartitionStyle GPT
$Part = Get-Disk 3 | new-Partition -UseMaximumSize -AssignDriveLetter:$False
$Part | set-partition -NoDefaultDriveLetter:$True
$Part | Format-volume -confirm:$False
If you look at the output of Get-Partition the NoDefaultDriveLetter value is TRUE. After running Add-PartitionAccessPath it changes to FALSE. You can set it back with the Set-Partition command:
Get-Partition -DiskNumber 3 -Partition 2 | add-PartitionAccessPath c:\SomePath -passthru | set-Partition -NoDefaultDriveLetter:$True
I had a bunch of them to do so I used the following:
Function Config-Disk {
[cmdletbinding()]
Param(
[INT]$Disk,
[INT]$Partition = 2,
[String]$Label,
[String]$MountPoint
Get-Disk $Disk | Initialize-Disk -Partitionstyle GPT
Get-Disk $Disk | New-Partition -UseMaximumSize |
Format-Volume -FileSystem NTFS -NewFileSystemLabel $Label -Confirm:$False
Add-PartitionAccessPath -DiskNumber $Disk -PartitionNumber $Partition -AccessPath $MountPoint -Passthru |
set-Partition -NoDefaultDriveLetter:$True
MD "c:\SomeLocation1"
MD "c:\SomeLocation2"
Config-Disk -Disk 3 -Label "SomeLabel1" -MountPoint "c:\SomeLocation1"
Config-Disk -Disk 4 -Label "SomeLabel2" -MountPoint "c:\SomeLocation2"

Similar Messages

  • IPod assigned drive letter drops when iTunes launches (windows xp)

    My iPod looses its assigned drive letter in windows when iTunes launches. Up until the last Apple iPod software update, it worked fine. I unstalled iTunes and attached my iPod, it stay's connected (it doesn't loose it's drive letter).
    I reinstalled iTunes, and the minute it launched, the iPod drive letter goes away. iTunes can't fined the iPod with out the assigned drive letter. Any help in fixing this problem would be GREAT. thank you Dragon47

    How would I manually assign a drive letter (Windows XP) to my ipod?
    If I uninstall iTunes, the drive letter windows assigns to the iPod stays. The ipod dowsn't loose it's drive letter. If I install iTunes, the minute it starts up, the assigned windows drive letter goes away, and itunes can't find the ipod.
    Up until the last Apple iPod download software update, it worked fine
    Thank you for your help

  • [SOLVED] How to automatically mount USB drives with custom mount point

    edit:
    Original title was : 'Unable to mount USB disk via /etc/rc.local', but got changed since the /etc/rc.local problem isn't relevant for me anymore.
    Hello,
    Since I am new to this forum, I'll start off with this :
    Thanks to archlinux, its founder and all its contributors, cause this is the operating system (flavour) that annoys me the least.
    The root problem :
    I want to automount USB storage devices to other places than /media/ and without the need for programs that depend on gnome and the like. As I tried some stuff with hald and such, I didn't really get to a nice and easy to configure solution. Any hints in that direction are always welcome.
    For now, automount of known USB storages devices during boot, will do.
    So the things I tried and didnt work :
    1.
    Provide the disk info to /etc/fstab (via the disks UUID and 'auto' filesystem)
    Add 'mount /mountpoint' to /etc/rc.local
    Result : the mount command in rc.local says '... specify filesystem'
    However, after boot, running /etc/rc.local mounts the USB disks correctly.
    2.
    Provide the disk info to /etc/fstab (via the disks UUID and the correct filesystem)
    Add 'mount /mountpoint' to /etc/rc.local
    Result : pc doesn't get through boot process and gives me the 'ctrl-d to reboot or root passwd for maintenance'
    3.
    Provide no disk info in /etc/fstab
    Add the full mount line to /etc/rc.local (mount -t fs /dev/disks/by-uuid/MyUUID /MyMountpoint )
    Result : don't remember the output of the mount execution, but well, it didn't mount
    However, after boot, running /etc/rc.local mounts the USB disks correctly.
    Is there something that isn't loaded at the time of rc.local execution that I need for mounting of USB devices ? Or why else is this failing ?
    Regards,
    BasiK
    Last edited by BasiK (2009-08-28 07:22:50)

    Thanks for the hint hunterthomson, but the pc I will be using it on, is an own-built HTPC/home file server, so there is no way I want to use a graphical file manager to get the usb disks mounted.
    I tried to figure out a little about udev rules, and I got to do what I wanted to do, so thx for pointing me in that direction Mr.Elendig.
    Btw, I am indeed also using auto-sleep/park disks, but this udev way works perfectly.
    I added two rules files to /etc/udev/rules.d/ :
    The first for a known usb disk (with its volume uuid), with a named mountpoint under my media dir /symbiosis/ :
    [basik@plox ~]$ cat /etc/udev/rules.d/80-usb-utopia.rules
    ACTION=="add", KERNEL=="sd[b-z][0-9]", ENV{ID_FS_UUID}=="a59332c2-07ba-4c52-afb5-20e361bdf71a",SYMLINK+="usb-%n", GROUP="storage", NAME="%k"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", ENV{ID_FS_UUID}=="a59332c2-07ba-4c52-afb5-20e361bdf71a",RUN+="/bin/mkdir -p /symbiosis/utopia"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", ENV{ID_FS_UUID}=="a59332c2-07ba-4c52-afb5-20e361bdf71a", RUN+="/bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/%k /symbiosis/utopia", OPTIONS="last_rule"
    ACTION=="remove", KERNEL=="sd[b-z][0-9]", ENV{ID_FS_UUID}=="a59332c2-07ba-4c52-afb5-20e361bdf71a", RUN+="/bin/umount -l /symbiosis/utopia", OPTIONS="last_rule"
    The second for unknown usb disks, to mount under the same dir. This is simply taken from the archwiki http://wiki.archlinux.org/index.php/Ude … .26_Tricks
    Make sure these rules are executed after the ones for specific usb disks.
    [basik@plox ~]$ cat /etc/udev/rules.d/usb-disks.rules
    KERNEL=="sd[a-z]", NAME="%k", SYMLINK+="usb%m", GROUP="storage", OPTIONS="last_rule"
    ACTION=="add", KERNEL=="sd[a-z][0-9]", SYMLINK+="usb%n", GROUP="storage", NAME="%k"
    ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mkdir -p /symbiosis/usb%n"
    ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/%k /symbiosis/usb%n", OPTIONS="last_rule"
    ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/umount -l /symbiosis/usb%n"
    ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/rmdir /symbiosis/usb%n", OPTIONS="last_rule"
    These may not be the nicest looking udev rules, but it works for what I wanted to do with it.

  • BootCamp cannot create new partition on drive free space.

    Hi Folks,
    I am hoping for some advice here. I am running OS X (10.5.6) and wish to use Boot Camp to created a partition to install Windows XP SP2 for some gaming. My machine is a late 2007 MBP 2.4GHz C2D, 4GB RAM, 340GB WD transplanted hard drive.
    I have about 180GB of free space for a new partition to be created for the XP install.
    When I fire up the Boot Camp Assistant tool, I am immediately informed of the following:
    "The startup disk cannot be partitioned or restored to a single partition."
    "Back up the disk and use the Disk Utility to format it as a single Mac OS Extended (Journaled) volume. Restore your information to the disk and try using the Boot Camp Assistant again."
    + I have never had more than one partition on this drive.
    + I installed the drive new with no partition and used a tool named 'Carbon Copy Cloner' to transfer data from the original drive onto this drive, the machine booted right away and I have been using it without issue ever since.
    + I have run Disk Utility to 'Verify Disk', 'Verify Disk Permissions' and 'Repair Disk Permissions' all ran with no problems and completed successfully.
    My question is, how can I make a usable backup copy of the drive to restore back to the drive after performing the re-format?
    Can I use the Carbon Copy Cloner software for this? I want to make sure that the resulting internal drive is bootable, etc.
    I have been running Time Machine as well and have a disk full of backups from that app, but I have no idea how to use it to restore the drive to it's current state after re-partition and format.
    Thanks in advance for any and all suggestions.
    John

    So today I used the free "trial" version of SuperDuper to create a bootable clone of my primary internal drive.
    It was about 100GB and took a long time to copy onto USB 2.0 external SATA drive, but it worked.
    SuperDuper provided the option to make the copy the boot device as well. After reboot, I used OS X Disk Utility to erase primary drive.
    I then performed the operation in reverse, copying the entire contents back to the original location.
    After a reboot, I ran the Boot Camp Utility and received the same aggravating message which I received before.
    How can I be sure that I am actually re-formatting the target drive in order to consolidate free space? Is this my issue? When I performed the erase operation, I skipped the "zero out free space" step. Am I using the correct utility to prepare the target drive?
    Once again, any and all help is greatly appreciated.
    Regards,
    John

  • ImageMate All-in-One with Windows 8.1 - cannot assign drive letter

    Hello, I have SanDisk ImageMate All-in-One which worked perfectly well with Windows 7. I recently installed Windows 8.1. The external reader is OK with SD cards, but could not recognize my CF card. The card is SanDisk Extreme 32GB (120 MB/s) After reading in multiple forums, I found this page: http://kb.sandisk.com/app/answers/detail/a_id/12483/kw/imagemate+firmware After successfully applying this updated firmware, not I see the card, but only in the Windows Disk Manager. I cannot access it in the Windows Explorer because the drive has no letter. But when I right-click on the drive and try to assign a letter, I get: "The system cannot find the file specified." Please help!

    I am just the opposite.I can not read SD cards.Windows keeps popping up forme to format this drive.Tech support told me thisNote: If you are using Windows 7 or above, please make sure your card is in the reader while it is connected to the computer.The system now recognizes the image mate but still I can not read SD cards.All others are fine!Just wondering what you would do if youdid not have all of the cards supported?Luckily I did. 

  • [SOLVED] Toshiba 3.0 USB 2TB (HDTC720XK​3C1) Assigned Drive Letter But Not Working

    My external HD has 750gb of data that I cant access.  It shows up with a hard drive letter, but doesnt show like it used to (showing how much storage is used and unused) or showing it's assigned name.  It also doesnt work if I plug it into a different computer (does the same thing).  I cant remember if I properly removed it when I unplugged it last night when I finished using it, so that may be the cause.  I tried going to "manage drives" and uninstalling the drivers, but no luck.  Tried rebooting with it connected, no luck.  Tried unplugging for several hours and plugging back in, no luck.  I do not wish to reformat the drive because of the 750GB of data I'll lose.  Please help!  

    *****I FIXED IT!!!!!*******   I continued searching the web and found the fix.  All I needed to do was open the command prompt (cmd) and run this script "chkdsk /f E: (E: was the generic drive letter assigned).  Basically windows runs check disk and fixes the problem.  It also said you could try "chkdsk /r E:" but it worked on my first attempt.  Make sure you allow the computer enough time to finish.... It took a long time for it to completely finish.  (one way to know if it's done, you will be able to type in the cmd prompt again, if not, your computer is still working in the back ground)  After it was done, I ran my windows defender to check my removable drive for virus's and sure enough it found 3 threats.
    I HOPE THIS HELPS ANYONE ELSE WITH THE SAME PROBLEM as it seems like a relatively easy fix, but over 80 people had read my plee for help with no response.

  • New zone and inherited file system mount point error

    Hi - would anyone be able to help with the following error please. I've tried to create a new zone that has the following inherited file system:
    inherit-pkg-dir:
    dir: /usr/local/var/lib/sudo
    But when I try to install it fails with:
    root@tdukunxtest03:~ 532$ zoneadm -z tdukwbprepz01 install
    A ZFS file system has been created for this zone.
    Preparing to install zone <tdukwbprepz01>.
    ERROR: cannot create zone <tdukwbprepz01> inherited file system mount point </export/zones/tdukwbprepz01/root/usr/local/var/lib>
    ERROR: cannot setup zone <tdukwbprepz01> inherited and configured file systems
    ERROR: cannot setup zone <tdukwbprepz01> file systems inherited and configured from the global zone
    ERROR: cannot create zone boot environment <tdukwbprepz01>
    I've added this because unknown to me when I installed sudo from sunfreeware in the global it requires access to /usr/local/var/lib/sudo - sudo itself installs in /usr/local. And when I try to run any sudo commands in the new zone it gave this:
    sudo ls
    Password:
    sudo: Can't open /usr/local/var/lib/sudo/tdgrunj/8: Read-only file system
    Thanks - Julian.

    Think I've just found the answer to my problem, I'd already inherited /usr ..... and as sudo from freeware installs in /usr/local I guess this is never going to work. I can only think to try the sudo version of the Solaris companion DVD or whatever it's called.

  • Two new external FW drives won't mount at the same time

    Hi
    I've just purchased two 250Gb external FW hard drives for my eMac. I already have a 60Gb external FW hard drive.
    I also purchased a 6-port Belkin FW hub to hook them all up.
    I've been having problems getting the three drives to mount simultaneously.
    Initially I thought the problem was with the hub, or the FW cables, but the cables are fine, and if I take the hub out of the equation, and just try to mount two drives using the eMac's two FW ports, I still have problems.
    Either of the two new 250Gb drives will mount fine with the old 60Gb drive, but if I try to mount the two 250Gb drives simultaneously, only one will mount (which ever I plugged in first).
    The only way to get both 250Gb drives mounted at the same time is to use FW for one and USB for the other (way too slow).
    The 250Gb drives are Hitachi Deskstars in enclosures with the Oxford chipset.
    I've searched the internet for answers, but haven't found much, except, maybe, for this comment:
    'While this cannot solve all FireWire issues, I've spent a lot of time debugging multiple FireWire enclosures on the same computer. Apparently there is a unique hardware ID (similar to a MAC address in an Ethernet card) that some manufacturers are not making unique. Any time you have two or more drives with the same ID, you'll have problems.'
    Any ideas?
    Thank you.

    FWIW, I've tried to mount both drives on a friend's iBook, and the problem remains the same: it's one drive, or the other - both drives will not mount simultaneously.
    I updated to 10.3.9, but that hasn't fixed anything.
    Any ideas?

  • Optical drive no longer mounts blanks after erasing dvd-rw

    hi, hopefully someone can help with this -
    new macbook pro (couple months old)
    i've used the optical drive twice, to burn onto a couple maxell dvd+rw discs - this worked fine.
    today, i put one of the discs i'd previously used in, hit "erase" in disk utility ...
    since then, the drive won't mount or recognize any blank media ... (the drive just hums for a bit, then nothing)
    i tried the erased DVD-RW disc in another mac, it mounted fine - so the problem's not the discs ....
    the optical drive seems to mount old data DVD-R's, authored DVDs, and CD's just fine ... but it now won't mount any blank media at all (whether CD-R, DVD-RW, or DVD-R)
    weird - it's like erasing a DVD+RW has somehow wiped the drive's ability to mount fresh, blank discs...
    is it possible the erase operation busted something in the drive ... maybe that kind of operation uses part of the hardware mechanism that only affects the reading of blank media ? or could this be a software problem?
    i tried resetting pram and repairing perms, this had no effect.
    here's the spec of the optical drive :
    MATSHITA DVD-R UJ-875:
    Firmware Revision: DA09
    Interconnect: ATAPI
    Burn Support: Yes (Apple Shipping Drive)
    Cache: 2048 KB
    Reads DVD: Yes
    CD-Write: -R, -RW
    DVD-Write: -R, -R DL, -RW, +R, +R DL, +RW
    Write Strategies: CD-TAO, CD-SAO, DVD-DAO
    Media: Insert media and refresh to show available burn speeds

    ok, just to add to this -
    i made a small install of OSX.5.2 (from the MBP install disc) on a FW drive, and booted from that - and lo and behold, blank media is recognized ...
    ... so this points to a software problem ...

  • External hard drive won't mount, even after disk repair.

    My Toshiba external hard drive won't mount on my MacBook Pro 10.8.5. I can see it in my disk repair, and when I repair, "the partition map appears to be ok." But I can't access the icon to be able to open the hard drive contents on my desktop. Help!

    Hello maccynicwhoalwayshasmacs,
    Thanks for the question. After reviewing your post, it sounds like trouble with an external HD mounting. I would recommend that you read this article, it may be able to help you resolve or isolate the issue.
    USB and FireWire Quick Assist
    Thanks for using Apple Support Communities.
    Have a nice day,
    Mario

  • Changing Oracle Mount Point After Installation Is Completed.

    How easy is it to change an Oracle Mount Point once an SAP installation has been completed?  Reason I am asking, is another Basis person believes it's easier to wipe the partition and reinstall.

    Hello,
    Yes this is OK (for SAP/Oracle) and easy for unix team too. You please shut down SAP and Oracle completely and Unix expert can change the file system. But be careful that the exact mount point 'name' should remain intact. For e.g. '/oracle/SID' is a mount point and if you want to change the file system or mount this particular 'directory' onto a different filesystem/partition then the 'mount point name' i.e. 'oracle/SID' should remain same - as required by oracle/sap to run.
    Thanks

  • Drives no longer mount - Only after restart do they mount

    Upgrade to from 10.4 to 10.5 and ran all updates...currently have 10.5.4. My external drives no longer mount when i plug them in via usb port. Worked perfectly before upgrade. Additionally my ipod wont mount either. They dont show up in disc utility either...However if i have these devices plugged in with the computer turned on (and they aren't mounting) and i restart my computer then when it boots up again they mount and function just fine. but if i unmount and turn them off and turn them back on...they dont mount.
    any suggestions?

    Hi grant862
    I seam to be having the same issue. I have a number of Flash cards and a flash card reader, well tow card readers actually. I cant get the cards to mount. I have tried swapping usb cables and card readers. I have tried both readers in all my USB ports (17" Mac Book - 10.5.4). The only way that I can get them to mount is if I plug the cards back into the cam,eras an connect them. I think there is a software glitch somewhere. I don't think its the usb ports as I have tried keyboards and mice connected via these ports with no issue. I don't expect an answer to this, but Grant - if you are still out there - I wanted you to know you weren't alone. I am going to try re-installing the 10.5.4 combi download and see what happens. Oh yes and 'repair permissions' (which I have already done once...) but am beginning to think that this is just a bit like saying a mantra as a way of calming me.
    ...Ohmmm madhi padhi ohmmm....

  • BUG: Sandisk USB flash drive in "half-mounted" state after wake from sleep

    My Sandisk Cruzer Crossfire 4GB Flash Drive is left in a half-mounted state after wake from sleep. The Finder believes the drive is still mounted, the icon is on the Desktop. However opening a file on the drive, or trying to eject the drive, results in a long beach ball, followed by a message that I removed the drive without Ejecting it first. The same drive continues to work fine on my Tiger machine, and on PCs.
    Bug Report:
    Setup:
    Macbook 1st Gen (2.0 Ghz)
    Mac OS X Leopard 10.5 Clean Install
    Sandisk Cruzer Crossfire 4GB USB Flash Drive (in either port)
    Repro:
    Plug in the drive.
    Close the MacBook to put it to sleep
    Reopen the MacBook
    Result:
    The lights on the flash drive never light back up after wake from sleep. Navigating the drive, or trying to eject it results in a "you removed the device without ejecting it first" message.
    Expected:
    Drive should still be mounted and accessible after waking back up.

    It may be a design flaw in the device. Mac OS X does a lot more power management than most other OSes, including tearing devices down to little or no power during sleep. It is possible that the device simply misbehaves due to corrupted memory state or reports a substantially different GUID or something similarly bizarre upon wake. (Okay, that last one wouldn't technically be a power management issue....)
    If it doesn't have any problems except when sleeping the system, I would just make sure I unmounted it before putting the machine to sleep and wouldn't worry about it. Maybe check with Sandisk to see if they have a firmware updater for the device.

  • Ipod not keeping assigned drive letter

    My Ipod would not be assigned a disk letter, but even after I do it manually my computer will not recognize it. Also, after I unplug my Ipod it no longer has a disk letter assigned.

    could you possibly send us a screenshot of your Disk Management while the ipod is plugged in? there's instructions on how to do that given in this user tip:
    hudgie: Taking screenshots to help with problems

  • My new LaCie hard drive won't mount on my mac book pro

    I bought a LaCie P9233 hard drive, I try to connect to my MacBook Pro that runs Mac OSX 10.6.8. I connect and I get a message saying the disk is not readable by my computer. It then gives me the option of "Initialize", "Ignore" or "Eject". Can anyone help?

    I believe you hsave to first launch Setup Assistant:
    http://manuals.lacie.com/en/manuals/porsche-9233/connection

Maybe you are looking for

  • I can't install Itunes because of Windows installer package error, please help!

    I tried installing Itunes for a long time on my desktop, I'm running Vista. Everytime I try to install Itunes it runs for a bit, then gives me this message " There is a problem with Windows Installer package. A program required for this install to co

  • Wireless Printing - HP LaserJet P1102w

    Yesterday I purchased an HP LaserJet P1102w printer, followed all the instructions that came in the pack and enjoyed trouble free wireless printing for a short little while, even from my iPhone 4 after updating the firmware on the printer. My proble

  • Menu still images "flicker" ever so slightly

    Hi, I have a question about still images used on my main menu after building with DVD SP. For my main menu, I am using three different photographs. After I build the DVD and mount it in DVD player, parts of the image "flicker" or "wiggle" a little bi

  • Authorization of Organizational elements at user level

    Sir, Is there any way by which I can assign organisational elments like-plant,company code,etc. to user id instead of Role? Thanks & regards, Sachin Taware 9920290697

  • Nokia belle for nokia500

    Sir, i have heard that belle will be avaliable by feb 2012, is it true?