You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get-Date : Cannot bind parameter 'Date' to the target. Exception setting "Date": "Cannot convert null to type
"System.DateTime"."
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\vmUsers.ps1:30 char:17
Get-Date : Cannot bind parameter 'Date' to the target. Exception setting "Date": "Cannot convert null to type
"System.DateTime"."
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\vmUsers.ps1:30 char:17
Get-DesktopVM : No output object matching the Pool_id parameter
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\vmUsage.ps1:13 char:10
$vms += Get-DesktopVM -Pool_id $pool.pool_id
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : ObjectNotFound: (vmware.view.pow...ts.GetDesktopVM:GetDesktopVM) [Get-DesktopVM], Ex
ion
FullyQualifiedErrorId : No object,vmware.view.powershell.cmdlets.GetDesktopVM
Method invocation failed because [vmware.view.powershell.cmdlets.DesktopVM] does not contain a method named
'op_Addition'.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\vmUsage.ps1:13 char:2
Method invocation failed because [vmware.view.powershell.cmdlets.DesktopVM] does not contain a method named
'op_Addition'.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\vmUsage.ps1:13 char:2
Method invocation failed because [vmware.view.powershell.cmdlets.RemoteSession] does not contain a method named
'op_Addition'.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\vmUsage.ps1:12 char:2
& : File \vmmanager\E\Project\data\scripts\lastLogin.ps1 cannot be loaded. The file
\vmmanager\E\Project\data\scripts\lastLogin.ps1 is not digitally signed. You cannot run this script on the current
system. For more information about running scripts and setting execution policy, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\unusedVMs.ps1:11 char:12
FullyQualifiedErrorId : UnauthorizedAccess
& : File \vmmanager\E\Project\data\scripts\lastLogin.ps1 cannot be loaded. The file
\vmmanager\E\Project\data\scripts\lastLogin.ps1 is not digitally signed. You cannot run this script on the current
system. For more information about running scripts and setting execution policy, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\unusedVMs.ps1:11 char:12
FullyQualifiedErrorId : UnauthorizedAccess
& : File \vmmanager\E\Project\data\scripts\lastLogin.ps1 cannot be loaded. The file
\vmmanager\E\Project\data\scripts\lastLogin.ps1 is not digitally signed. You cannot run this script on the current
system. For more information about running scripts and setting execution policy, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\unusedVMs.ps1:11 char:12
FullyQualifiedErrorId : UnauthorizedAccess
& : File \vmmanager\E\Project\data\scripts\lastLogin.ps1 cannot be loaded. The file
\vmmanager\E\Project\data\scripts\lastLogin.ps1 is not digitally signed. You cannot run this script on the current
system. For more information about running scripts and setting execution policy, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\unusedVMs.ps1:11 char:12
FullyQualifiedErrorId : UnauthorizedAccess
& : File \vmmanager\E\Project\data\scripts\lastLogin.ps1 cannot be loaded. The file
\vmmanager\E\Project\data\scripts\lastLogin.ps1 is not digitally signed. You cannot run this script on the current
system. For more information about running scripts and setting execution policy, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\unusedVMs.ps1:11 char:12
Get-Content : A positional parameter cannot be found that accepts argument 'Select-String'.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\lastLogin.ps1:23 char:17
Get-Content : A positional parameter cannot be found that accepts argument 'Select-String'.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\lastLogin.ps1:23 char:17
Get-Content : A positional parameter cannot be found that accepts argument 'Select-String'.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\lastLogin.ps1:23 char:17
The script can't find data that needs to be generated in advance by vmUsage.ps1, therefore the variables are empty and you see these errors.
I think you are missing the VMware Horizon Powershell modules because of the ObjectNotFound error or the expression on the right needs to be placed in parentheses.
This seems to be running on a different computer. Your powershell execution policy on this one does not allow to run the script.
Hi,
I am unable to run below scripts, I get the exceptions as stated:
1. vmUsers.ps1
Cannot index into a null array.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\vmUsers.ps1:27 char:3
You cannot call a method on a null-valued expression.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\vmUsers.ps1:28 char:3
Get-Date : Cannot bind parameter 'Date' to the target. Exception setting "Date": "Cannot convert null to type
"System.DateTime"."
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\vmUsers.ps1:30 char:17
Cannot index into a null array.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\vmUsers.ps1:27 char:3
You cannot call a method on a null-valued expression.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\vmUsers.ps1:28 char:3
Get-Date : Cannot bind parameter 'Date' to the target. Exception setting "Date": "Cannot convert null to type
"System.DateTime"."
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\vmUsers.ps1:30 char:17
2. vmUsage.ps1
Get-DesktopVM : No output object matching the Pool_id parameter
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\vmUsage.ps1:13 char:10
ion
Method invocation failed because [vmware.view.powershell.cmdlets.DesktopVM] does not contain a method named
'op_Addition'.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\vmUsage.ps1:13 char:2
Method invocation failed because [vmware.view.powershell.cmdlets.DesktopVM] does not contain a method named
'op_Addition'.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\vmUsage.ps1:13 char:2
Method invocation failed because [vmware.view.powershell.cmdlets.RemoteSession] does not contain a method named
'op_Addition'.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\vmUsage.ps1:12 char:2
3. unusedVMs.ps1
& : File \vmmanager\E\Project\data\scripts\lastLogin.ps1 cannot be loaded. The file
\vmmanager\E\Project\data\scripts\lastLogin.ps1 is not digitally signed. You cannot run this script on the current
system. For more information about running scripts and setting execution policy, see about_Execution_Policies at
http://go.microsoft.com/fwlink/?LinkID=135170.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\unusedVMs.ps1:11 char:12
& : File \vmmanager\E\Project\data\scripts\lastLogin.ps1 cannot be loaded. The file
\vmmanager\E\Project\data\scripts\lastLogin.ps1 is not digitally signed. You cannot run this script on the current
system. For more information about running scripts and setting execution policy, see about_Execution_Policies at
http://go.microsoft.com/fwlink/?LinkID=135170.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\unusedVMs.ps1:11 char:12
& : File \vmmanager\E\Project\data\scripts\lastLogin.ps1 cannot be loaded. The file
\vmmanager\E\Project\data\scripts\lastLogin.ps1 is not digitally signed. You cannot run this script on the current
system. For more information about running scripts and setting execution policy, see about_Execution_Policies at
http://go.microsoft.com/fwlink/?LinkID=135170.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\unusedVMs.ps1:11 char:12
& : File \vmmanager\E\Project\data\scripts\lastLogin.ps1 cannot be loaded. The file
\vmmanager\E\Project\data\scripts\lastLogin.ps1 is not digitally signed. You cannot run this script on the current
system. For more information about running scripts and setting execution policy, see about_Execution_Policies at
http://go.microsoft.com/fwlink/?LinkID=135170.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\unusedVMs.ps1:11 char:12
& : File \vmmanager\E\Project\data\scripts\lastLogin.ps1 cannot be loaded. The file
\vmmanager\E\Project\data\scripts\lastLogin.ps1 is not digitally signed. You cannot run this script on the current
system. For more information about running scripts and setting execution policy, see about_Execution_Policies at
http://go.microsoft.com/fwlink/?LinkID=135170.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\unusedVMs.ps1:11 char:12
4. lastLogin.ps1
Get-Content : A positional parameter cannot be found that accepts argument 'Select-String'.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\lastLogin.ps1:23 char:17
Get-Content : A positional parameter cannot be found that accepts argument 'Select-String'.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\lastLogin.ps1:23 char:17
Get-Content : A positional parameter cannot be found that accepts argument 'Select-String'.
At C:\Users\anupcp\Desktop\vmware-vdi-master\scripts\lastLogin.ps1:23 char:17
... teAndUser = Get-Content "$usageFileLocation$file" Select-String -NotM ...
Any help would be much appreicated.
Thanks
The text was updated successfully, but these errors were encountered: