-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update List-HostnamesInContract.ps1 #40
base: master
Are you sure you want to change the base?
Conversation
Hi, thanks for the work, but was failing (to me) using PS 7.2 till I added the @() as an array. Hope this helps.
Hey, thanks for the PR. Can you tell me which version of Powershell you use, and which Akamai account please? I would like to reproduce the error |
Hi!
Sorry, my bad, I told you 7.3.1?. I ran from ISE:
Major Minor Build Revision
----- ----- ----- --------
5 1 20348 1366
I was running without making it array:
PS C:\Users\[USER]> $PropHostnames = List-PropertyHostnames -GroupID
$Property.groupId -ContractId $Property.contractId -PropertyId
$Property.propertyId -PropertyVersion $Property.LatestVersion -Section
$Section -AccountSwitchKey $AccountSwitchKey
No se puede convertir el valor "@{cnameType=EDGE_HOSTNAME;
cnameFrom=[CORRECT FQDN]; cnameTo=failover.edgesuite.net;
certProvisioningType=CPS_MANAGED}" al tipo "System.Collections.ArrayList".
Error: "No se puede convertir el valor
"@{cnameType=EDGE_HOSTNAME; cnameFrom=[CORRECT FQDN]; cnameTo=
failover.edgesuite.net;
certProvisioningType=CPS_MANAGED}" de tipo
"System.Management.Automation.PSCustomObject" al tipo
"System.Collections.ArrayList"."
En línea: 1 Carácter: 1
+ $PropHostnames = List-PropertyHostnames -GroupID $Property.groupId -C ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : MetadataError: (:) [],
ArgumentTransformationMetadataException
+ FullyQualifiedErrorId : RuntimeException
When modifying to "@([......])"
PS C:\Users\[USER]> $PropHostnames = @(List-PropertyHostnames -GroupID
$Property.groupId -ContractId $Property.contractId -PropertyId
$Property.propertyId -PropertyVersion $Property.LatestVersion -Section
$Section -AccountSwitchKey $AccountSwitchKey)
PS C:\Users\[USER]> $PropHostnames
cnameType cnameFrom cnameTo
certProvisioningType
--------- --------- -------
--------------------
EDGE_HOSTNAME [CORRECT FQDN] failover.edgesuite.net
CPS_MANAGED
I am afraid I cannot provide you the AKAMAI account as I am not the owner.
But there are several groups and properties in each one.
Let me know where I made the mistake, and accept my apologies if so!
Best regards,
Pablo
El mié, 18 ene 2023 a las 17:34, Stuart Macleod ***@***.***>)
escribió:
… Hey, thanks for the PR. Can you tell me which version of Powershell you
use, and which Akamai account please? I would like to reproduce the error
—
Reply to this email directly, view it on GitHub
<#40 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEMV7MCDJXP2XN4URP7ZGO3WTALRHANCNFSM6AAAAAAT7ISJ3Q>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Thanks for the info @pablolurquilopez . I am trying to narrow down the problem, but I suspect the issue is with Powershell's sometimes annoying habit of converting single-item arrays into just an object of that single item. It tends to confuse PS 5. Can you tell me the email address you use to log in to Akamai please? I can try it against your Akamai access to more easily narrow it down. Also these scripts are pretty old and I can make them way more efficient now, so will overhaul them shortly. If you want to list all hostnames in a given account, check out Get-AppSecHostnameCoverage. I think that would give you the whole list, though not which property, group and contract each hostname is associated with. |
Merge in A2S/akamaipowershell from cpcodes to master * commit '93e9c2f3a2963045b4ea5bffd3eec05aba3433a4': Added testing, minor fixes Unifying usage Name fix
Hi, thanks for the work, but was failing (to me) using PS 7.2 till I added the @() as an array. Hope this helps.