I’m building a new 2012R2 server that will replace an existing 2008R2 application server. I want to see what roles I need to install on the new server, so I run the Get-WindowsFeature cmdlet in PowerShell to give me what I need.
I have saved the output of Get-WindowsFeature to .csv on 2 servers, a new server and the old, production server.
The -ReferenceObject and -DifferenceObject options weren’t needed in this example. I got the same output with and without it.
So, on both new and old server, File Server, Remote Server Administration tools, are installed.
The new server has its own default roles and features installed and the old server has the list of roles that must be installed onto the new server, if applicable. The old server is 2008 and the new server is 2012 R2. Many features are now either default (PowerShell) or updated (.NET Framework 4.5). This list isn’t one to one, but it gives me an idea what needs to be installed in order to migrate a service from one OS to another. T
There are many useful applications for diff’ing files. What are some of your most common uses?
You can assign the files to variables and use the split() function to get rid everything up to a delimiter and output the ‘newly cleaned’ file to a new file.
The -ShowWindow parameter will give you a popup window with the help topic you’re researching. You can search words and phrases within the help topic. The found term is highlighted for easy reading and you can move between terms using the previous and next buttons. The window can be resized and you can increase or decrease the text with the slider at the bottom of the window. The description is a bit shorter for some cmdlets, but there are even some command examples displayed in the help window to get you going without coming out of your prompt.
Gone are the days of opening a second Powershell window to reference the help while crafting command line syntax. -ShowWindow is a great too in the Powershell arsenal.
~Note~ This works differently in PS 4.0 and 5.0. and within different builds of Windows 10.
Some contents are missing or out of order. It appears it is a known issue.
Your mileage may vary.
Don’t forget HelpCmdletname-online It launches help in the browser. Keeping you in your PS window without taking you away from your prompt.
Checking the hash of a file you’ve downloaded from the internet is very good practice. It’s a way to ensure the file you’re downloading hasn’t been tampered with, according to the hash provided on the site you’re downloading from.
Since Powershell 4.0, Get-FileHash has been a way to check the hash signature of a file.