robotechredmond / azure-powershell-snippets Goto Github PK
View Code? Open in Web Editor NEWPersonal repo for common Azure PowerShell snippet samples
Personal repo for common Azure PowerShell snippet samples
Hi, I am currently converting VM image to have Managed Disks.
thanks to your code, I am almost done with the conversion.
During the conversion, I faced "CloseError" and noticed that the string for StorageAccountType was "Standard_LRS" before conversion. Thus I suspected that the string should be set as "Premium_LRS" instead of "PremiumLRS", which is written in your code snippet.
Anyways, thanks for sharing a good snippet, and please revise if I am correct.
The updated script in AADTool (Common.ps1) relies on a newer version of the AAD dll than that which is provided. Running script with old version leads to the following error: New-Object : Cannot find type [Microsoft.IdentityModel.Clients.ActiveDirectory.PlatformParameters]: verify that the assembly containing this type is loaded.
After using the AAD tool with much success for the past four months, we have found we now get the following error.
nvoke-RestMethod : {"odata.error":{"code":"Authentication_MissingOrMalformed","message":{"lang":"en","value":"Access Token missing or malformed."}}}
At C:\Chaz\ToolBox\Devops\Atlas-Infrastructure\src\scripts\AzureMgmt\AADTool\Common.ps1:43 char:13
return (Invoke-RestMethod $uri -Method $method -Headers $headers ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
WARNING: Web Application Creation Failed
I have already updated to the latest DLL, although I'm not sure why this wasn't updated in the last commit?
@crpub86
We ran into an issue with the "AzureRM - Move existing VM to new VNET.ps1" script. The issue kept the VM from being recreated, after it was removed.
New-AzureRmVm : Changing property 'osDisk.name' is not allowed.
ErrorCode: PropertyChangeNotAllowed
ErrorMessage: Changing property 'osDisk.name' is not allowed.
StatusCode: 409
ReasonPhrase: Conflict
We had to comment out line 201 to keep the PowerShell script from attempting to rename the OSDisk's name. It does not appear to be supported. When you comment out the line, the OS Disk's name does not change and the VM is created properly.
Original:
201 $vm.StorageProfile.OSDisk.Name = $vmName
Updated:
201 #$vm.StorageProfile.OSDisk.Name = $vmName
When running the AADTool's I keep getting this error.
Method invocation failed because
[Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext] does not contain a method named 'AcquireToken'
What do I need to do to fix?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.