Skip to main content


Showing posts from June, 2018

SSH into Linux boxes with PowerShell from Windows Server 2016

With an ever-changing IT environment, you need a way to manage everything from a centralized location, if possible. If you're in a Windows/Linux hybrid environment, PowerShell is your friend. Let's get started.

First, you will need a nifty little module called Posh-SSH on your Windows Server/Desktop. You can install this by running;

Install-Module Posh-SSH

 After that, you want to ensure SSH is configured on your Linux box. Depending on what distro, these settings may vary. I personally like using open-SSH. You can check the status of SSH on your Linux box by typing;

sudo service ssh status

After that, we will be good to start an SSH session from our Windows Server/Desktop.

The first thing we want to do is open up PowerShell ISE. We also want to ensure to store this SSH session into a variable. Use the following one-liner;

$Sess = New-SSHSession -ComputerName IPADDRESS -Credential (get-credential)

 When the credentials pop up, you will type in your username and password. (please n…

Spinning up a new Domain Controller with Server 2016 Server Core, PowerShell, and DSC

** Prerequisites**
1) Preferably a test environment away from your production domain.
2) A VM for testing.
3) Preferably, a virtualization environment. You don't need Hyper-V or ESXi for this. VMWare Player or Workstation on a machine with 8GB of RAM and preferably an I7 will work just fine
4) xPSDesiredStateConfiguration, xActiveDirectory, and xNetworking Modules installed on your VM running the DC. For installing a module, please use the Install-Module cmdlet.
5) Running all of these cmdlets/remoting in PowerShell ISE.

Spinning up a Domain Controller can take some time, especially with all of the pointing and clicking. Instead of that, let's utilize PowerShell and DSC (Desired State Configuration) which is free Configuration Manager built into PowerShell. Let's get started.

First, we want to spin up a VM for our domain controller. In my case, I'm using Server 2016 Datacenter Server Core. For help in spinning up a VM with PowerShell, please visit my GitHub on automati…

Windows Subsystem For Linux

So.. Windows Subsystem....for....Linux? Bash? On Windows? Why yes, let's check it out.

What is this strange cross-platform, dual-booting witchcraft? Well, the first thing I can assure you is that it's not dual-booting. The second thing I'm 90% sure of is that it's not witchcraft.

Windows Subsystem for Linux is essentially as it sounds, it's a "sub" (child) kernal running right on your Windows 10 desktop. Even better? You can find the Linux kernals right in the Windows store. First, let's install Ubuntu and Kali.

1) Open up the Windows Store and search "Windows Subsystem For Linux". You will see a pop-up to run Linux. When you click that, you will see all of the current distros.

2) Click whichever distros you want to install. In my case, I'm going to install Ubuntu and Kali.

3) Click "get" and once it's installed, you can launch. You can also click in your search bar and find your distros

4) First thing you will see when you…