Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 230613

Re: Scipt to give Administrator role for AD group

$
0
0

I removed Space from  the folder path, but seems still am missing something.. I ran the script got  below given error message.

One more thing am adding AD service account but not the AD-GROUP.

 

Name                           Port  User
----                           ----  ----
vcenter01                   443   xyz.com\Myself
Doing esxi-1.xyz.com
Get-VMHost : A positional parameter cannot be found that accepts argument
'@{VMHost=esxi-1.xyz.com}'.
At C:\Users\Myself\Desktop\esxiuknownserver\ADserviceACadd.ps1:7 char:6
+ $x = Get-VMHost $VMHost -Name $VMhost.VMhost | New-VIPermission -Role ...
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-VMHost], ParameterBind
   ingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,VMware.VimAutomation
   .ViCore.Cmdlets.Commands.GetVMHost

Doing esxi-2.xyz.com
Get-VMHost : A positional parameter cannot be found that accepts argument
'@{VMHost= esxi-2.xyz.com}'.
At C:\Users\Myself\Desktop\esxiuknownserver\ADserviceACadd.ps1:7 char:6
+ $x = Get-VMHost $VMHost -Name $VMhost.VMhost | New-VIPermission -Role ...
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-VMHost], ParameterBind
   ingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,VMware.VimAutomation
   .ViCore.Cmdlets.Commands.GetVMHost


Viewing all articles
Browse latest Browse all 230613

Trending Articles



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