Possibly the easiest manual way is in Windows 10 and Windows 2012 R2 (likely previous versions too but don’t have them handy while writing this): From the Desktop, right click on the Windows icon (Start Menu) in the bottom left of the screen Click on “System” Click the “Advanced system…
Category: PowerShell
PowerShell – UNIX SED Equivalent – Change Text In File
Unix SED command is very useful to make changes to a configuration file when you know what the default values are, below is a way to do a SED-like text change in PowerShell Example: TeamCity Build Agent Configuration file needs updated so it knows where the server is.
PowerShell – Install MySQL
Recently I had to install MySQL and configure it rather quickly, hopefully this will help someone else First off install Chocolatey Then Install MySQL
PowerShell – REST Client with Basic Authentication
First listed source code is without authentication, whereas the second is with basic authentication GitHub: https://gist.github.com/dkittell/65890843f6224e45bb4e
PowerShell – RSS Feed Reader
GitHub: https://gist.github.com/dkittell/ca4025e4e78ccecbb5f0
PowerShell – Add Windows Feature
First figure out what features are installed To add a feature look at the listing from Get-WindowsFeature and it will have something like XPS-Viewer or Web-Http-Redirect
PowerShell – Get-TinyURL API Call
GitHub: https://gist.github.com/dkittell/d11d6bf7ac03d5c52355
PowerShell – PowerShell Installed/Compatible Version
Possibly one of my important commands is to find out what version I have available on the computer. There are various ways to get this and some are rather long and arduous in comparison This will display something like this:
PowerShell – Get/Set Windows Date/Time from NTP
Sometimes w32Time is not available or practical so we get this PowerShell script to pull NTP date/time and set the Windows Date/Time GitHub: https://gist.github.com/dkittell/56f957c850f1064cbea0 Reference: chrisjwarwick.wordpress.com
PowerShell – FTP Upload Directory With Sub-Directories
This script below will connect to a FTP server and upload the folder with sub-directories and content to the defined path. Currently this script will assume it needs to create the directories. GitHub: https://gist.github.com/dkittell/f029b6c7d1c46ebcffcb