Tag Archives: powershell

How to install PowerShell using PowerShell

This cmdlet is tricky to find in Google because searching for install powershell using powershell won’t give you much. So here it is: Install-WindowsFeature PowerShell or Install-WindowsFeature PowerShell-V2 P.S. How to find exact name of particual Windows Feature to install? … Continue reading

Posted in Infrastructure | Tagged | Leave a comment

How to start using recently uploaded Azure disk

After you uploaded a vhd and before you can start really using it you must mark it as a data disk or as an OS disk using the following command: Add-AzureDisk -DiskName ‘myvhd.vhd’ -MediaLocation http://example.blob.core.windows.net/container/myvhd.vhd -OS Windows

Posted in Infrastructure | Tagged , | Leave a comment

How to re-create symlinks of VM configs in Hyper-V using PowerShell

Hyper-V keeps VM config at %ProgramData%\Microsoft\Windows\Hyper-V\Virtual Machines\ as a symbolic link (aka symlink) to the original location. You may get them broken due to various reasons, e.g.: Server disaster and then recovery Upgrade to the next version of OS/Hyper-V and … Continue reading

Posted in Infrastructure | Tagged , | Leave a comment

How to select Azure subscription if you have more than one using PowerShell

If you have more than one Azure subscription in your account and try to upload a vhd using the instruction: Get-AzurePublishSettingsFile Import-AzurePublishSettingsFile d:credentials.publishsettings Add-AzureVhd -LocalFilePath d:my.vhd -Destination http://example.com/blob/container You may get an error saying that selected account doesn’t have given … Continue reading

Posted in Infrastructure | Tagged , | Leave a comment