In order to work in PowerShell with Azure you need to have the modules setup properly, the script below will help get you ready to go then test it.
Category: Code
This area of the site is dedicated to code snippets for quick and easy reference
PowerShell – Azure – Get Virtual Networks
If you work in Azure these two functions are very valuable additions to your library. Note: This majority of this code is copied from the reference below. I added Gateway Address to the Network Routes along with DNS Reference: http://blog.kloud.com.au/2014/11/11/get-azure-virtual-networks-with-powershell/
PowerShell – Random Password Generator
Similar to C# – Random Password Generator but this will work with PowerShell scripts. This script has a minimum of four (4) characters but you can change that to whatever you would like. Reference: http://www.wisesoft.co.uk/scripts/powershell_random_password_generator.aspx Another approach Reference: http://poshcode.org/5806
PowerShell – Set Execution Policy Permissions
In order for PowerShell to run scripts you need to grant it specific permissions. Restricted No scripts can be run. Windows PowerShell can be used only in interactive mode. AllSigned Only scripts signed by a trusted publisher can be run. RemoteSigned Downloaded scripts must be signed by a trusted publisher…
RedHat – WordPress Install
These steps are based on RedHat Server 64-bit Download RedHat Install RedHat Configure RedHat Install WordPress Configure WordPress Backup/Restore MySQL Database
Ubuntu – Install GUI Desktop From Terminal
Make sure that you do the chown command otherwise you may not be able to login. Example would be this for username demo
Get Windows Shortcut (.lnk) Details
The below will help you get the full path of a Windows shortcut (.lnk) in your program. The below examples specifically create a command-line executable file but you could use the function in your program just as well. View the full code in GitHub at https://github.com/dkittell/lnk-parser VB.Net example converted from…
PHP – File Download
When WGET isn’t available PHP comes to the rescue. In this example $path file name can be different than the $url file name or the same, if it is different it will be saved with the file name in $path
PowerShell – Add Windows Feature IIS Site Management
If you are on a freshly installed Windows server and can’t find IIS Site Mangement try this script below.
PowerShell – Get WebAdministration
If you are on a newly installed server and trying any of the IIS PowerShell scripts on this site that call “Import WebAdministration” you may have some issues if the “WindowsPowerShellWebAccess” feature isn’t installed, this script below should help.