UnityreplicationParameters
bananaphonee opened this issue · comments
Hello @equelin ,
I have the following problem.
I want to set the -isReplicationDestination to true.
Well the problem I have is I want to set this option to true for some LUNs.
I found the following in the file Unity-Powershell.psm:
Class UnityreplicationParameters {
#Properties
[Bool]$isReplicationDestination #Indicates whether the storage resource is a replication destination.
Values are:
- true - Storage resource is a replication destination.
- false - (Default)
Storage resource is not a replication destination.
#Methode
}
I also found that one as a parameter in the class unitylun.
Now I tried some things to use this in the code for set-UnityLun but I can't get it working..
This is the code I added in the set-UnityLun.ps1:
In the beginning this:
[Parameter(Mandatory = $false,HelpMessage = 'Is replication destination enabled or not')]
[bool]$isReplicationDestination,
Then where the body is made this:
$body["UnityreplicationParameters"] = @{}
$UnityreplicationParameters = @{}
If ($PSBoundParameters.ContainsKey('isReplicationDestination')) {
$UnityreplicationParameters["isReplicationDestination"] = $isReplicationDestination
}
$body["UnityreplicationParameters"] = $UnityreplicationParameters
Everytime I try this the following error occures:
The array sends an error message:
Error code: 422
Error description: Unprocessable Entity
Error details: {"error":{"errorCode":131149877,"httpStatusCode":422,"messages":[{"en-US":"Request body is not correct. There may be duplicate parameters, wrong parameter name
. Please refer to API documentation page and ensure the body is correct. (Error Code:0x7d13035)"}],"created":"2018-05-23T12:51:41.129Z"}}
Invoke-WebRequest : De externe server heeft een fout geretourneerd: (422) Unprocessable Entity.
At line:34 char:15
- ... $data = Invoke-WebRequest -Uri $URI -ContentType "application/jso ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
- FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
I don't know if this is the way to go.. But I am stuck, so all help is welcome here.
$PSVerionTable:
Name Value
PSVersion 5.1.17134.48
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.48
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Get-Module:
Name : ISE
Path : C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\ISE\ISE.psm1
Description :
ModuleType : Script
Version : 1.0.0.0
NestedModules : {}
ExportedFunctions : {Get-IseSnippet, Import-IseSnippet, New-IseSnippet}
ExportedCmdlets :
ExportedVariables :
ExportedAliases :
Name : Microsoft.PowerShell.Management
Path : C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Management\Microsoft.PowerShell.Management.psd1
Description :
ModuleType : Manifest
Version : 3.1.0.0
NestedModules : {Microsoft.PowerShell.Commands.Management.dll}
ExportedFunctions :
ExportedCmdlets : {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}
ExportedVariables :
ExportedAliases : {gcb, gin, gtz, scb...}
Name : Microsoft.PowerShell.Security
Path : C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Security\Microsoft.PowerShell.Security.psd1
Description :
ModuleType : Manifest
Version : 3.0.0.0
NestedModules : {Microsoft.PowerShell.Security.dll}
ExportedFunctions :
ExportedCmdlets : {ConvertFrom-SecureString, ConvertTo-SecureString, Get-Acl, Get-AuthenticodeSignature...}
ExportedVariables :
ExportedAliases :
Name : Microsoft.PowerShell.Utility
Path : C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Utility\Microsoft.PowerShell.Utility.psd1
Description :
ModuleType : Manifest
Version : 3.1.0.0
NestedModules : {Microsoft.PowerShell.Commands.Utility.dll, Microsoft.PowerShell.Utility}
ExportedFunctions : {ConvertFrom-SddlString, Format-Hex, Get-FileHash, Import-PowerShellDataFile...}
ExportedCmdlets : {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
ExportedVariables :
ExportedAliases : {CFS, fhx}
Name : Microsoft.WSMan.Management
Path : C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\Microsoft.WSMan.Management\Microsoft.WSMan.Management.psd1
Description :
ModuleType : Manifest
Version : 3.0.0.0
NestedModules : {Microsoft.WSMan.Management.dll}
ExportedFunctions :
ExportedCmdlets : {Connect-WSMan, Disable-WSManCredSSP, Disconnect-WSMan, Enable-WSManCredSSP...}
ExportedVariables :
ExportedAliases :
Name : Unity-Powershell
Path : C:\Users\larsh\Documents\WindowsPowerShell\Modules\Unity-Powershell\0.16.0\Unity-Powershell.psm1
Description : Powershell module for working with EMC Unity array
ModuleType : Script
Version : 0.16.0
NestedModules : {}
ExportedFunctions : {Connect-Unity, Disable-UnityFastCache, Disconnect-Unity, Enable-UnityFastCache...}
ExportedCmdlets :
ExportedVariables :
ExportedAliases :
Can you maybe help how to use this or where to use this, would be a great help!
Thanks in advance.
Greetings,
Bananaphone
Please makes sure these boxes are checked before submitting your issue (put an X between the brackets).
- Check that your Powershell version > 5.0 (Bonus point if you are using the latest version available)
- Check that you follow the instructions for installing the module
Also, please provide:
- Any instructions that may help to reproduce the problem
- Informations about your host
$PSVerionTable
- The list of the loaded modules
Get-Module
Hello @bananaphonee ,
Unfortunately, you can't manage Replication with Unity-Powershell. Defined a LUN as a replication destination is not enough to configure the wall replication process.
I'm planning to add those functions in the next release but I can't provide any release date... Any help will be very welcome ;-)
Regards
Hi @equelin,
Yeah I just found out how to set the parameter to true.
I was looking how I could setup the session between the two now..
The fault I made to make the parameter true was I used UnityreplicationParameters and this needed to be replicationParameters. Now my LUN is set to true.
Greetings,
Bananaphone