Get monitor serial number powershell serial#
This requires a feature Passing Dynamic parameters between commands and use cmdlets Add-WfaWorkflowParameter to save the generated parameter( lun serial num in our case) in cmd-1 and then Get-WfaWorkflowParameter in cmd-2 to get this value and send this info in an email.
Get monitor serial number powershell serial number#
In sense Create Lun and obtain the serial number in command-1 then have a 2nd command which sends email with this Lun info. For the requirement of getting the serial number and sending this by email, I would suggest to keep modularity in commands instead of doing everything in 1 large mega command.WFA command execution needs Get-WfaLogger. Write-Host also won't display anything in WFA executions.For those who like interactive inputs, there is Password as User Input feature provided which helps for interactive password inputs during workflow execution. WFA users need to save the credentials of the cluster in WFA-> Execution -> Credentials. Search for PowerShell, right-click the top result, and select the Run as administrator option. WFA can detect some interactive cmdlets and prevent being hung, but not all. To retrieve the serial number of your computer with a PowerShell command, use these steps: Open Start. In fact it can possibly hung the command till a command time-out occurs and users won't have a clue what's going on. So $credentials = $host.ui.PromptForCredential("Connect to cluster $cluster", "Please enter the user name and password","","") will NOT work. Also it mainly tried to get NAA identifiers on luns for Vmware ESX system, so most of this code is not useful for this requirement. But to be used with WFA its needs modifications. This code works Drew, thanks for the post. Write-Host "$lunPath,$serialNumber,$identifier$naasn" $lun = Get-NcLun -Vserver $vserver -Path $lunPath -Controller $cluster
![get monitor serial number powershell get monitor serial number powershell](https://patrick6649.files.wordpress.com/2017/10/unbenannt40.png)
![get monitor serial number powershell get monitor serial number powershell](https://4sysops.com/wp-content/uploads/2017/12/Getting-the-certificate-details.png)
$cluster = Connect-NcController $cluster -Credential($cred) $credentials = $host.ui.PromptForCredential("Connect to cluster $cluster", "Please enter the user name and password","","") I havent tried it out personally but looks like it should work. However, I did find a postĀ fromĀ mbeattie that gives the following example. I ran through the various LUN commands for clustered Data ONTAP but was not able to find anything solid.