-
×InformationWindows update impacting certain printer icons and names. Microsoft is working on a solution.
Click here to learn moreInformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center.
-
×InformationWindows update impacting certain printer icons and names. Microsoft is working on a solution.
Click here to learn moreInformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center.
- HP Community
- Software
- Commercial PC Software
- Re: Set-HPiLOSchemalessDirectory is not working with variabl...
Create an account on the HP Community to personalize your profile and ask a question
10-18-2019 11:47 AM
When trying to set up iLO AD Groups using the HPiLO cmdlets in Powershell, I'm getting an error. The code line is as follows:
Set-HPiLOSchemalessDirectory -GroupAccount Enable -server $server -DisableCertificateAuthentication - Credential $Creds $str
When the code runs, I get the following error:
A positional parameter cannot be found that accepts argument '-Group1Name group -Group1Priv "1,2,3,4,5,6" -Group1SID ""'
$str in the command is the string containing '-Group1Name group...Group1SID ""'
Following Group1SID are 2 double-quotes to make a blank entry ($Null does not work)
The odd thing is that I can manually type the command and replace $str with the copied contents from the error message, and it works fine. Any assistance would be appreciated. Thanks.
Solved! Go to Solution.
Accepted Solutions
10-25-2019 05:26 PM
For those who may have this issue, the problem lies with passing parameters for the powershell cmdlets. The parameter name (i.e. -group1name, group2name, etc.) may not be passed from within a variable. It must be a standalone item as is the -server and -Credential parameters shown in the example. The following would succeed:
Set-HPiLOSchemalessDirectory -GroupAccount Enable -server $server -DisableCertificateAuthentication - Credential $Creds -Group1Name $G1Name -Group1Priv $G1Priv -Group1SID $G1Sid
10-25-2019 05:26 PM
For those who may have this issue, the problem lies with passing parameters for the powershell cmdlets. The parameter name (i.e. -group1name, group2name, etc.) may not be passed from within a variable. It must be a standalone item as is the -server and -Credential parameters shown in the example. The following would succeed:
Set-HPiLOSchemalessDirectory -GroupAccount Enable -server $server -DisableCertificateAuthentication - Credential $Creds -Group1Name $G1Name -Group1Priv $G1Priv -Group1SID $G1Sid
Didn't find what you were looking for? Ask the community