Automatic & Control
9 TopicsPowerShell: Find VNet of an ARM VM
Hi everyone, it took me quite some time to find a way to get the VNet an ARM VM belongs to by using PowerShell. I don't think this is the perfect solution, but I would like to share it in order someone else needs to find out. I would be interested in better ways of getting attached networks. I will start the discussion with this code snippet $vnets= Get-AzureRmVirtualNetwork $vm = Get-AzureRmVM -name $newVm.Name -ResourceGroupName $newRG $vmIPId = $vm.NetworkProfile.NetworkInterfaces.Id foreach ($vnet in $vnets){ $vnetIPId = $vnet.Subnets.IpConfigurations.Id if ($vnetIPId.Startswith($vmIPId) ){ $vnetName = $vnet.Name return } } Cheers Christian9.7KViews3likes6CommentsAzure DSC extension fails to installed "ParentResourceNotFound"
I am unable to add VMs as DSC Nodes in my Azure Automation Account. So I tried to install the dsc extension using the powershell cmdlet "Register-AzureRmAutomationDscNode". This failed with the error (Somes details removed and replaced with < .. >) eploymentName : 20171227013800 ResourceGroupName :<RG NAME> ProvisioningState : Failed Timestamp : 27/12/2017 13:38:05 Mode : Incremental TemplateLink : Uri : https://eus2oaasibizamarketprod1.blob.core.windows.net/automationdscpreview/ azuredeployV2.json ContentVersion : 1.0.0.0 Parameters : Name Type Value =============== ========================= ========== vmName String <VMNAME> location String uksouth modulesUrl String https://eus2oaasibizamarketprod1.blob.core.window s.net/automationdscpreview/RegistrationMetaConfigV2.zip configurationFunction String RegistrationMetaConfigV2.ps1\RegistrationMetaConfigV2 registrationKey SecureString registrationUrl String https://uks-agentservice-prod-1.azure-automation. net/accounts/<A GUID> nodeConfigurationName String configurationMode String ApplyAndAutocorrect configurationModeFrequencyMins Int 15 refreshFrequencyMins Int 30 rebootNodeIfNeeded Bool False actionAfterReboot String ContinueConfiguration allowModuleOverwrite Bool False timestamp String 27/12/2017 13:38:00 Outputs : DeploymentDebugLogLevel : I can see that this is an ARM error, but I can't understand why im getting it. The target VM exists and I have also tried pulling the name straight from the get-azurermvm cmdlet. Any ideas?Solved5.1KViews0likes3CommentsAzure Automation overview
Microsoft Azure Automation provides a way for users to automate the manual, long-running, error-prone, and frequently repeated tasks that are commonly performed in a cloud and enterprise environment. It saves time and increases the reliability of regular administrative tasks and even schedules them to be automatically performed at regular intervals. You can automate processes using runbooks or automate configuration management using Desired State Configuration. This article provides brief overview of Azure Automation and answers some common questions about automation and Desired State Configuration (DSC) .3.8KViews1like0CommentsIs it possible to autoscale an azure server that is not a part of an availability set?
Good day, I created a server for a client but would need the RAM to be increased from 8GB to 16GB for 2 weeks out of the month then revert to 8GB automatically. Is it possible to do so if the server is not a part of an availability set? A shutdown to do the increase would be fine. We would just schedule it.1.7KViews0likes2Comments- 1.3KViews0likes0Comments
Update management via OMS for Windows Server 2008 R2 servers?
The OMS portal says "Windows Computers must be running Windows Server 2012 or later" when you go and make an update deployment, but the documentation states "The solution supports performing update assessments against Windows Server 2008 and higher, and update deployments against Windows Server 2008 R2 SP1 and higher" along with "Support for deploying updates to Windows Server 2008 R2 SP1 requires .NET Framework 4.5 and WMF 5.0 or later." I'm not able to actually get update management deployment to Windows Server 2008 R2 servers to apply patches, even with .Net 4.5 and WMF 5.0 or later. Is there something I'm missing?2.6KViews0likes1Comment