Quantcast
Channel: ONTAP Discussions topics
Viewing all articles
Browse latest Browse all 4949

not able to bring the volume online.

$
0
0

Hi All,

 

I am trying this code to bring the offline volumes to online state but i am seeing an error. Any help is much appriciated.

#Verify the volume state

$onlinevolumes = Get-NcVol

$onlinevolumes

if ($offlinevolumes = Get-NcVol |where {$_.State -ne "online"}) {

Write-Host "Volumes found which is/are not in online state, non online volumes are:$offlinevolumes"

$userresponse=Read-Host -Prompt "Press any to bring the volumes online"

Set-NcVol ($offlinevolumes |select Name) -Online }

 

Else {Read-Host -Prompt "No non online volumes found,press any key yo continue"}

-------------------------------------------------------------------------------------------------------------------

 

Here is the error:

 

Set-NcVol : Cannot convert 'System.Object[]' to the type 'System.String' required by parameter
'Name'. Specified method is not supported.
At line:13 char:11
+ Set-NcVol ($offlinevolumes |select Name) -Online }
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (Smiley Happy [Set-NcVol], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgument,DataONTAP.C.PowerShell.SDK.Cmdlets.Volume.Set
NcVol


Viewing all articles
Browse latest Browse all 4949

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>