Automation is great. However most of the time, while doing certain tasks, you need to use a different set of credentials then the current logged on user. You can put direct password in plain text inside script but this is not a best practice or recommended one. After all, passwords are safe only if they are kept secret. Writing them in clear text inside script defies the overall purpose. So we’ll see how to avoid this scenario. Let’s start with basics first.
We can get user credential by using cmdlet Get-Credential and storing them inside a variableRead More »
PowerShell remoting is useful to manage virtual machines using PowerShell. When you create a virtual machine in the classic azure model, a winrm endpoint is automatically configured and can be used to manage virtual machines. You’ll just need to import ssl on your local machine and connect to the remoting session. However, same is not created if you create a virtual machine in the resource manager model. So if you try to connect using PowerShell remoting for azure rm vm, you’ll see Read More »
Sometimes you may see this kind of error on the PowerShell prompt, where an error message would be like, “Your Azure credentials have not been set up or have expired, please run Add-AzureAccount to set up your Azure credentials.”
This may persist even if you add azure account again or restart powershell prompt Read More »
Like other things, there are more than one way to delete Azure Virtual Machines. However with nearly all of them, you have a choice whether you want to delete vhds for the virtual machines or not. Sometimes it may be helpful to retain the disks for later use.
For delete virtual machine from classic portal, use below command: