<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Powershell - create clone, mount clone in Array Setup and Networking</title>
    <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981612#M65</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam, thanks.  those are very good scripts. I’ll see if I can customize them according to my need. I’ll probably spend some time on improving my PS script skill first ☺&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jul 2013 14:57:58 GMT</pubDate>
    <dc:creator>jliu79</dc:creator>
    <dc:date>2013-07-29T14:57:58Z</dc:date>
    <item>
      <title>Powershell Script to Create Clone, Mount Clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981590#M43</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;G'Morning,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have a script or point me in the right direction for the following script/tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;## Microsoft OS requirement ##&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Select a Volume Snap&lt;/LI&gt;&lt;LI&gt;Create a Clone&lt;/LI&gt;&lt;LI&gt;Mount Snap&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With NetApp's Snapdrive - it is posisble to select a snapshot of a LUN and mount that at another drive letter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know this is all possible manually, just very tedious task when trying to restore data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not I'll work on it myself &lt;IMG src="https://community.hpe.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sparkles&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 10:22:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981590#M43</guid>
      <dc:creator>smilerspeaking136</dc:creator>
      <dc:date>2013-07-22T10:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981591#M44</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://github.com/jrich523/NimblePowerShell" title="https://github.com/jrich523/NimblePowerShell"&gt;jrich523/NimblePowerShell · GitHub&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whatever it doesnt do for you, let me know and i'll add it in.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 15:22:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981591#M44</guid>
      <dc:creator>jrich52352</dc:creator>
      <dc:date>2013-07-22T15:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981592#M45</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome, thank you &lt;IMG src="https://community.hpe.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2013 08:38:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981592#M45</guid>
      <dc:creator>smilerspeaking136</dc:creator>
      <dc:date>2013-07-23T08:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981593#M46</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Justin, is there any documentation about what those scripts do and how to use them? Thanks. I'm looking for something similar as Mike asked but I'm no expert on power shell scripting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 18:49:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981593#M46</guid>
      <dc:creator>jliu79</dc:creator>
      <dc:date>2013-07-24T18:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981594#M47</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I have not had time to populate the docs. I've tried to create all of the functions in a very standard way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you tell me what you're trying to do i could provide the code you'd use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I should in the next week or so have time to get back on top of this, I need to add "volume collections" and populate the docs and then i'll have the majority of the gui functionality implemented.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 19:03:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981594#M47</guid>
      <dc:creator>jrich52352</dc:creator>
      <dc:date>2013-07-24T19:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981595#M48</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jason - there is a rather excellent introduction tutorial &lt;A href="http://www.powershellpro.com/powershell-tutorial-introduction/"&gt;here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Many of the things Justin is using in his rather excellent scripts is also covered in that tutorial. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps &lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 19:17:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981595#M48</guid>
      <dc:creator>rfenton4</dc:creator>
      <dc:date>2013-07-24T19:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981596#M49</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;basically I'm looking for scripts to make restoring data easier. Just like Mike said, clone a volume from a snapshot, give access permission of that volume to a server, connect to the volume using iSCSI in the server. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 19:18:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981596#M49</guid>
      <dc:creator>jliu79</dc:creator>
      <dc:date>2013-07-24T19:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981597#M50</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Those are all in the module, have you loaded it successfully?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to connect first, but you can get a list of all functions by running the following command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gcm -Module nimble&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will return about 18 functions. the names are pretty self explanatory..&lt;/P&gt;&lt;P&gt;You can use tab to help complete things, for example if you do &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get-nsvolume -&amp;lt;tab&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then tab through the different parameters.&lt;/P&gt;&lt;P&gt;I would suggest using powershell ISE to start since the intellisense will really help.&lt;/P&gt;&lt;P&gt;This was created in powershell 3 but should be compatible with&amp;nbsp; 2, however i strongly suggest you use v3.&lt;/P&gt;&lt;P&gt;I've tried to add a good deal of protection to any remove command, but, like anything else, be careful with what you do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your case, are you talking about taking a snapshot that you have already and converting it in to a close and setting access? Is the snapshot from a protection plan?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 20:01:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981597#M50</guid>
      <dc:creator>jrich52352</dc:creator>
      <dc:date>2013-07-24T20:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981598#M51</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Justin, I tried the gcm –Module nimble command and it returns nothing. I copied all the scripts into my powershell profile and the folder is named nimble. I’m running Windows 8 which is powershell version 4. Does that matter? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 12:46:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981598#M51</guid>
      <dc:creator>jliu79</dc:creator>
      <dc:date>2013-07-25T12:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981599#M52</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so you'll want to copy all of the files (and unblock them) to&lt;/P&gt;&lt;P&gt;my documents\windowspowershell\modules\nimble&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dump all the files in that folder and then from powershell type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import-module nimble&lt;/P&gt;&lt;P&gt;gcm -module nimble&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also, V4 is currently only with Windows 2012 R2 and as a CTP download. however if you do have it, it will work fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 15:16:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981599#M52</guid>
      <dc:creator>jrich52352</dc:creator>
      <dc:date>2013-07-25T15:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981600#M53</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did try the import command and here’s what I got:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import-Module : Could not load file or assembly&lt;/P&gt;&lt;P&gt;'file:///C:\Users\admin\Documents\WindowsPowerShell\Modules\nimble\GroupMgmt.dll' or one of its dependencies. Operation&lt;/P&gt;&lt;P&gt;is not supported. (Exception from HRESULT: 0x80131515)&lt;/P&gt;&lt;P&gt;At line:1 char:1&lt;/P&gt;&lt;P&gt;+ Import-Module nimble&lt;/P&gt;&lt;P&gt;+ ~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + CategoryInfo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : InvalidOperation: (&lt;IMG src="https://community.hpe.com/legacyfs/online/emoticons/happy.png" /&gt; , FileLoadException&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 15:20:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981600#M53</guid>
      <dc:creator>jliu79</dc:creator>
      <dc:date>2013-07-25T15:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981601#M54</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is from the Win8 box?&lt;/P&gt;&lt;P&gt;if you type in $host what do you get? It should say its V3. if its V2 then its possible that the groupmgmt.dll might be compiled for .net 4.0 and since powershell V2 is .net 2.0 that might cause an issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also did you unblock the files? that might also cause it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can do, in V3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gci "$(split-path $profile)\modules\nimble" -r | Unblock-File&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 15:26:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981601#M54</guid>
      <dc:creator>jrich52352</dc:creator>
      <dc:date>2013-07-25T15:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981602#M55</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was on a Windows server 2012 datacenter which has version 3. I confirmed it by running get-host command. The files have been unblocked too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 15:29:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981602#M55</guid>
      <dc:creator>jliu79</dc:creator>
      <dc:date>2013-07-25T15:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981603#M56</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One thing I noticed is you said groupmgmt.dll might be compiled for .net 4.0 but I only have 4.5 on my Windows 8 and Windows server 2012. That might causing the issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 15:52:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981603#M56</guid>
      <dc:creator>jliu79</dc:creator>
      <dc:date>2013-07-25T15:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981604#M57</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try doing this, go to the folder that contains the files (nimble folder) and type this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add-type -Path .\GroupMgmt.dll&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also, im not sure if this matters,but do you run it elevated? i have mine set to by default.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 16:26:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981604#M57</guid>
      <dc:creator>jrich52352</dc:creator>
      <dc:date>2013-07-25T16:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981605#M58</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Justin. Running add-type command fixed the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 17:11:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981605#M58</guid>
      <dc:creator>jliu79</dc:creator>
      <dc:date>2013-07-25T17:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981606#M59</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats kind of odd since essentially thats what the import-module is doing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 17:12:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981606#M59</guid>
      <dc:creator>jrich52352</dc:creator>
      <dc:date>2013-07-25T17:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981607#M60</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did stumble across this yesterday - after getting wound up using disk part, new PS modules should be able to cover the requirements for disk part when mounting a clone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://swodniw.wordpress.com/2012/10/12/powershell-cmdlets-one-by-one-or-how-to-replace-diskpart-with-powershell/" style="font-size: 10pt; line-height: 1.5em;"&gt;http://swodniw.wordpress.com/2012/10/12/powershell-cmdlets-one-by-one-or-how-to-replace-diskpart-with-powershell/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll be looking into this in a week or so.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 12:16:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981607#M60</guid>
      <dc:creator>smilerspeaking136</dc:creator>
      <dc:date>2013-07-26T12:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981608#M61</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yeah 2012 is awesome with its cmdlets... we're making a push to get to 2012 for this reason. however you can feed stuff to diskpart fairly easily..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$id = gwmi win32_diskdrive -ComputerName $ComputerName -Credential $Credential -Filter "model LIKE 'vmware%'" | sort @{e={(($_.size /1gb) / $size)%1}},index -Descending |select -first 1 -exp index&lt;/P&gt;&lt;P&gt;$dpscript = @"&lt;/P&gt;&lt;P&gt;select disk $id&lt;/P&gt;&lt;P&gt;online disk noerr&lt;/P&gt;&lt;P&gt;convert gpt noerr&lt;/P&gt;&lt;P&gt;create partition primary noerr&lt;/P&gt;&lt;P&gt;assign letter=$letter&lt;/P&gt;&lt;P&gt;FORMAT FS=NTFS UNIT=64k QUICK Label=SQL&lt;/P&gt;&lt;P&gt;"@&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$job = Invoke-Command -ScriptBlock {$args[0] | diskpart} -Session $session -ArgumentList $dpscript&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use this as part of my Add-DriveToVm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 15:24:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981608#M61</guid>
      <dc:creator>jrich52352</dc:creator>
      <dc:date>2013-07-26T15:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell - create clone, mount clone</title>
      <link>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981609#M62</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've just got the following to work - (Remove "write-host" from the "foreach" line **or leave in to see what its going to do &lt;IMG src="https://community.hpe.com/legacyfs/online/emoticons/wink.png" /&gt;**):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;### get Nimble disks ###&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;$nimbledisks = get-disk | Where {$_.Manufacturer -like "Nimble*"} | select -expandproperty "number"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;### Remove readonly ###&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;write-host "remove readonly atribute from disks &amp;gt; $nimbledisks" -foregroundcolor yellow&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;foreach( $disk in $nimbledisks ){ write-host set-disk -number $disk -isreadonly 0}&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;write-host "Disks &amp;gt; $nimbledisks -&amp;gt; writeable" -foregroundcolor green&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;### Remove offline ###&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;write-host "remove offline atribute from disks &amp;gt; $nimbledisks"&amp;nbsp; -foregroundcolor yellow&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;foreach( $disk in $nimbledisks ){ write-host set-disk -number $disk -isoffline 0}&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;write-host "Disks &amp;gt; $nimbledisks -&amp;gt; online" -foregroundcolor green&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;&lt;IMG alt="onlinedisks.PNG.png" class="jive-image" src="https://community.hpe.com/legacyfs/online/1248_onlinedisks.PNG.png" style="width: 620px; height: 366px;" /&gt;&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P style="font-family: Calibri; font-size: 11.0pt;"&gt;Next I need to work out assigning drive letters, holiday first though &lt;IMG src="https://community.hpe.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2013 16:21:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/array-setup-and-networking/powershell-script-to-create-clone-mount-clone/m-p/6981609#M62</guid>
      <dc:creator>smilerspeaking136</dc:creator>
      <dc:date>2013-07-26T16:21:18Z</dc:date>
    </item>
  </channel>
</rss>

