Closed michelkamp closed 3 years ago
I deployed to Azure just three days ago - are you sure it's not a temporary issue? Most of the time issues with Azure labs are due to cmdlets changing, APIs changing, outages, ...
I'll set up a lab my self and let you know the result. In the meantime @michelkamp could you let me know which Azure module version you use? get-installedmodule az
By the way: I see your machines are named SCOM... Did you see our new SCOM roles? Give them a try :)
Quick update from my end: I've just deployed the sample lab PowerShell Lab Azure
with zero issues. I am using version 5.6 of the Az bootstrapper module and the region West Europe as well.
I see that in the gallery we are at 5.8, so I will run a second lab after the update. But I don't expect anything to break with a new minor release. But we'll see.
That good news. Indeed we use the script to install a SCOM env. Till now I added custom code to do this. I look over the code : https://github.com/AutomatedLab/AutomatedLab/blob/develop/AutomatedLab/AutomatedLabScom.psm1 And see some addition , setting the SCOM grooming parameters for example:
Invoke-LabCommand -ActivityName 'Retention OPS DB' -ScriptBlock { import-module "C:\Program Files*\Operations Manager\Powershell\OperationsManager\OperationsManager.psd1" Set-SCOMDatabaseGroomingSetting -AlertDaysToKeep 7 -AvailabilityHistoryDaysToKeep 7 -EventDaysToKeep 4 -JobStatusDaysToKeep 7 -MaintenanceModeHistoryDaysToKeep 7 -MonitoringJobDaysToKeep 7 -PerformanceDataDaysToKeep 7 -StateChangeEventDaysToKeep 7 Set-SCOMAlertResolutionSetting -HealthyAlertAutoResolveDays 7 -AlertAutoResolveDays 30 } -ComputerName $LabVMs -PassThru
Invoke-LabCommand -ActivityName 'Retention DWH DB' -ScriptBlock { Invoke-Sqlcmd -Database OperationsManagerDW -Query "UPDATE [OperationsManagerDW].[dbo].[StandardDatasetAggregation] SET [MaxDataAgeDays] = 30" } -ComputerName $LabVMs -PassThru
I will give it a try , as less code I have to maintain the better š
// michel
From: Jan-Hendrik Peters [MSFT] @.> Sent: Friday, 16 April 2021 11:26 AM To: AutomatedLab/AutomatedLab @.> Cc: michelkamp @.>; Mention @.> Subject: Re: [AutomatedLab/AutomatedLab] WARNING: System.ArgumentException: Argument passed in is not serializable. (#1148)
By the way: I see your machines are named SCOM... Did you see our new SCOM roles? Give them a try :)
ā You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAutomatedLab%2FAutomatedLab%2Fissues%2F1148%23issuecomment-821046294&data=04%7C01%7C%7C170bec71a9ea4064d16b08d900b9a752%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637541619630753939%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5QUse381NfIBxkAXj2DUv1kRmVKYmevO%2BYBJlCu3djk%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABT3VMSJEB7FVFQXIFH3IU3TI77CTANCNFSM43BC5WIA&data=04%7C01%7C%7C170bec71a9ea4064d16b08d900b9a752%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637541619630753939%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1NF7WMcffQ%2FCCvFh%2Br22nlGLVFMYAh57pdJSTz80bwk%3D&reserved=0.
It's the same you used.
PS C:\Windows\system32> get-installedmodule az
Version Name Repository Description
5.6.0 Az PSGallery Microsoft Azure PowerShell - C...
From: Jan-Hendrik Peters [MSFT] @.> Sent: Friday, 16 April 2021 11:25 AM To: AutomatedLab/AutomatedLab @.> Cc: michelkamp @.>; Mention @.> Subject: Re: [AutomatedLab/AutomatedLab] WARNING: System.ArgumentException: Argument passed in is not serializable. (#1148)
I deployed to Azure just three days ago - are you sure it's not a temporary issue? Most of the time issues with Azure labs are due to cmdlets changing, APIs changing, outages, ...
I'll set up a lab my self and let you know the result. In the meantime @michelkamphttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmichelkamp&data=04%7C01%7C%7C2dd5375d4b5a46f041fe08d900b971f2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637541618739196432%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5qabMA6NuUnePnt47Pw%2F%2B9nbdoXjJcGEuRY6J4A8QPI%3D&reserved=0 could you let me know which Azure module version you use? get-installedmodule az
- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAutomatedLab%2FAutomatedLab%2Fissues%2F1148%23issuecomment-821045464&data=04%7C01%7C%7C2dd5375d4b5a46f041fe08d900b971f2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637541618739206392%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=jnAIZf9BnscSWmhfSxsK8Ky4XT0G2zosblhFIhQIgNE%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABT3VMUMKDX6KZ3KN2GFECLTI765BANCNFSM43BC5WIA&data=04%7C01%7C%7C2dd5375d4b5a46f041fe08d900b971f2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637541618739206392%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=STo2XUdNH4YEmzTntVGcc8QKXSaVE61l%2B8hn0Hy%2FDKU%3D&reserved=0.
Did you also deployed a RootDC role ? I get this error if I deploy it to azure . (using local hyper-v it deploys fine) 2:13:15|00:11:28|00:00:01.890| - Waiting for machines to start up.. 12:13:59|00:12:12|00:00:46.296| - Waiting for Root Domain Controllers to complete installation of Active Directo ry and restart....................................Wait-LabADReady : Timeout occured waiting for Active Directory to be ready on Domain Controller: AD01. Retry count is 2 At C:\Program Files\WindowsPowerShell\Modules\AutomatedLab\5.34.0\AutomatedLabADDS.psm1:950 char:9
+ CategoryInfo : NotSpecified: (AD01:PSObject) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Wait-LabADReady
// michel
From: Jan-Hendrik Peters [MSFT] @.> Sent: Friday, 16 April 2021 11:49 AM To: AutomatedLab/AutomatedLab @.> Cc: michelkamp @.>; Mention @.> Subject: Re: [AutomatedLab/AutomatedLab] WARNING: System.ArgumentException: Argument passed in is not serializable. (#1148)
Quick update from my end: I've just deployed the sample lab PowerShell Lab Azure with zero issues. I am using version 5.6 of the Az bootstrapper module and the region West Europe as well.
I see that in the gallery we are at 5.8, so I will run a second lab after the update. But I don't expect anything to break with a new minor release. But we'll see.
- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAutomatedLab%2FAutomatedLab%2Fissues%2F1148%23issuecomment-821059238&data=04%7C01%7C%7C4387183d94d74e67b1ba08d900bceb4f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637541633655293132%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=eZC8iofgmGdDRMOf9dFcmhYqZciWIzt7MBbyNMEyYXk%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABT3VMQ4WDCJSFNGJZUSIPTTJAB2JANCNFSM43BC5WIA&data=04%7C01%7C%7C4387183d94d74e67b1ba08d900bceb4f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637541633655293132%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qOSstUbcXeI8kR%2BiGMDsxh1R%2FrjrtHlf5iaKX5ChTUE%3D&reserved=0.
What I also notice on by lab box is that I can't access the PowerShell gallery anymore.
Install-Module AutomatedLab -Force -AllowClobber WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2'. PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'AutomatedLab'. Try Get-PSRepository to see all available registered module repositories. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.1.2\PSModule.psm1:9349 char:21
+ CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Pack
age], Exception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPa
ckage
I already have set: add-type @" using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolicy : ICertificatePolicy { public bool CheckValidationResult( ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) { return true; } } "@ [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
And
But still no luck.
I think my lab box is broken ?? or do you have any idea ? Last week it was running fine. No updates done.
// michel
From: Jan-Hendrik Peters [MSFT] @.> Sent: Friday, 16 April 2021 11:49 AM To: AutomatedLab/AutomatedLab @.> Cc: michelkamp @.>; Mention @.> Subject: Re: [AutomatedLab/AutomatedLab] WARNING: System.ArgumentException: Argument passed in is not serializable. (#1148)
Quick update from my end: I've just deployed the sample lab PowerShell Lab Azure with zero issues. I am using version 5.6 of the Az bootstrapper module and the region West Europe as well.
I see that in the gallery we are at 5.8, so I will run a second lab after the update. But I don't expect anything to break with a new minor release. But we'll see.
- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAutomatedLab%2FAutomatedLab%2Fissues%2F1148%23issuecomment-821059238&data=04%7C01%7C%7C4387183d94d74e67b1ba08d900bceb4f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637541633655293132%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=eZC8iofgmGdDRMOf9dFcmhYqZciWIzt7MBbyNMEyYXk%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABT3VMQ4WDCJSFNGJZUSIPTTJAB2JANCNFSM43BC5WIA&data=04%7C01%7C%7C4387183d94d74e67b1ba08d900bceb4f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637541633655293132%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qOSstUbcXeI8kR%2BiGMDsxh1R%2FrjrtHlf5iaKX5ChTUE%3D&reserved=0.
This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 10 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.
This issue has been automatically closed because it is has not had activity from the community in the last 40 days.
Description
Suddenly my deploys to azure stopped working.
Expected behavior
The script should deploy several azure vms with AD , SQL roles and custom software installed
Actual behavior
The script deploys the azure vms and other resources but then failed to add the roles and software. I get this error message (see log below for more):
WARNING: System.ArgumentException: Argument passed in is not serializable. Parameter name: value
Steps to reproduce
Environment details
PowerShell Version
AutomatedLab components