- Community Home
- >
- Storage
- >
- HPE Nimble Storage
- >
- Array Setup and Networking
- >
- Re: Powershell - create clone, mount clone
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2013 08:20 AM
тАО07-25-2013 08:20 AM
Re: Powershell - create clone, mount clone
I did try the import command and hereтАЩs what I got:
Import-Module : Could not load file or assembly
'file:///C:\Users\admin\Documents\WindowsPowerShell\Modules\nimble\GroupMgmt.dll' or one of its dependencies. Operation
is not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1
+ Import-Module nimble
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: ( , FileLoadException
+ FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2013 08:26 AM
тАО07-25-2013 08:26 AM
Re: Powershell - create clone, mount clone
this is from the Win8 box?
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.
also did you unblock the files? that might also cause it
you can do, in V3
gci "$(split-path $profile)\modules\nimble" -r | Unblock-File
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2013 08:29 AM
тАО07-25-2013 08:29 AM
Re: Powershell - create clone, mount clone
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2013 08:52 AM
тАО07-25-2013 08:52 AM
Re: Powershell - create clone, mount clone
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2013 09:26 AM
тАО07-25-2013 09:26 AM
Re: Powershell - create clone, mount clone
try doing this, go to the folder that contains the files (nimble folder) and type this
add-type -Path .\GroupMgmt.dll
also, im not sure if this matters,but do you run it elevated? i have mine set to by default.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2013 10:11 AM
тАО07-25-2013 10:11 AM
Re: Powershell - create clone, mount clone
Thanks Justin. Running add-type command fixed the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2013 10:12 AM
тАО07-25-2013 10:12 AM
Re: Powershell - create clone, mount clone
Thats kind of odd since essentially thats what the import-module is doing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2013 05:16 AM
тАО07-26-2013 05:16 AM
Re: Powershell - create clone, mount clone
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.
I'll be looking into this in a week or so.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2013 08:24 AM
тАО07-26-2013 08:24 AM
Re: Powershell - create clone, mount clone
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..
$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
$dpscript = @"
select disk $id
online disk noerr
convert gpt noerr
create partition primary noerr
assign letter=$letter
FORMAT FS=NTFS UNIT=64k QUICK Label=SQL
"@
$job = Invoke-Command -ScriptBlock {$args[0] | diskpart} -Session $session -ArgumentList $dpscript
I use this as part of my Add-DriveToVm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2013 09:21 AM
тАО07-26-2013 09:21 AM
Re: Powershell - create clone, mount clone
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 **):
### get Nimble disks ###
$nimbledisks = get-disk | Where {$_.Manufacturer -like "Nimble*"} | select -expandproperty "number"
### Remove readonly ###
write-host "remove readonly atribute from disks > $nimbledisks" -foregroundcolor yellow
foreach( $disk in $nimbledisks ){ write-host set-disk -number $disk -isreadonly 0}
write-host "Disks > $nimbledisks -> writeable" -foregroundcolor green
### Remove offline ###
write-host "remove offline atribute from disks > $nimbledisks" -foregroundcolor yellow
foreach( $disk in $nimbledisks ){ write-host set-disk -number $disk -isoffline 0}
write-host "Disks > $nimbledisks -> online" -foregroundcolor green
Next I need to work out assigning drive letters, holiday first though