Home > Tintri VMstore™ > Knowledge Base > Tintri powershell cmdlet gives error on parameter TintriServer

Tintri powershell cmdlet gives error on parameter TintriServer

Applies To

 

Product(s)

Version(s)

Tintri Automation Toolkit (TAK)

1.0 Onwards

Tintri Hyper-V Services (THS) 3.0 Onwards

Description

 

This article explains how to use the Tintri powershell cmdlet parameter '-TintriServer'.

 

Symptoms

 

When running a powershell cmdlet from the Tintri Automation Toolkit or the Tintri Hyper-V Services (THS) kit, an optional parameter is "TintriServer". If you give the argument of the VMstore hostname here then this will give an error. 

 

Example:

PowerCLI C:\Scripts> Get-TintriVM -TintriServer myVMstore


Get-TintriVM : Cannot validate argument on parameter 'TintriServer'. The argument is not a valid TintriServer instance. Provide a valid TintriServer object instance for the TintriServer argument, then try running the command again.

 

Resolution

 

The "TintriServer" parameter looks for a secure credential session for the VMstore as opposed to the VMstore name or FQDN.

You need to modify the command or script so that you input the credentials for the VMstore into a PSCredential object.

 

This link explains the concept: 
http://www.adminarsenal.com/admin-ar...ntials-part-1/

 

In my example below, I use the object '$ts' though this does not need to use this name. Then when using the '-tintriServer' argument, pass it the PSCredential that you created and it should work. 

 

Example output from the Get-TintriVM command (truncated): 

PS C:\Users\User1> $ts = Connect-TintriServer myVMstore admin password 
WARNING: The certificate on Tintri server 'myVMstore' is not trusted. 
WARNING: myVMstore: Remote Certificate Chain Errors detected. 
WARNING: myVMstore: Remote Certificate Name Mismatch detected. 


PS C:\Users\User1> Get-TintriVM -TintriServer $ts 

Name : vmName1 
HypervisorManager : Synthetic Snapshot VM manager 
Host : 
FolderPath : 
HypervisorPath : 
HypervisorType : VMWARE 
StorageContainers : 
Uuid : 1F42C8BE-D19C-5575-2726-3795E48444E2-VIM-0000000000002329 
IsLive : False 
IsTemplate : False 
IsPoweredOn : False 
<truncated>

Viewing 3 of 3 comments: view all
reviewed and marked for approval 2-16-2017
Posted 11:07, 16 Feb 2017
returned to review stage, description is blank
Posted 07:56, 28 Feb 2017
Approved and published
Posted 08:06, 28 Feb 2017
Viewing 3 of 3 comments: view all
You must to post a comment.
Last modified
10:54, 22 Apr 2017

Tags

Classifications

This page has no classifications.