Using PowerShell to Copy to the Clipboard
When writing code in PowerShell the last thing you might think about isthe Windows clipboard. We all probably know the infamous Ctrl-C and Ctrl-V keyboard shortcuts to copy and paste from the clipboard but this is typically done via the GUI. In our PowerShell scripts, it's not too useful. However, did you know that you can use PowerShell to copy to the clipboard and retrieve it's contents?
Active Directory Database Size Monitoring: Building a Monitor
The Active Directory (AD) database is, by far, the most important piece of AD. After all, without the database, AD wouldn't be much good at all. AD needs to be up and active 24 hours a day. It's being depended on for many different services.
DSC Without the Configuration: Using Invoke-DscResource
Prior to Windows Management Framework (WMF) v5, people that wanted to use Desired State Configuration (DSC) to apply configurations to their machines were forced to go through the same procedure if they wanted to provision an entire server or just install a single Windows feature.
How to Create External Help for your PowerShell Module Functions
One of the most overlooked tasks of a PowerShell scripter is writing documentation and help. Scripters just want to write code and writing help to provide the user information on how to execute that code is an often neglected feature. Help, however, is a critical piece of any good PowerShell tool especially when it's being released for public consumption or is part of an important business process.
How to Create your First Chocolatey Package
As automation becomes more of necessity rather than a nicety, it's important we IT folk look at better ways to perform menial tasks; one of those tasks is installing software. Rather than download an MSI, double-click on it and run through the wizard, it would behoove you to think of a better way. In this blog post, learn how to create a Chocolatey package (a popular Windows packaging manager).
How to Deal with Dependencies in Your Pester Infrastructure Tests
When writing Pester infrastructure tests, you'll ultimately run across a common problem; dealing with dependencies. Unlike unit tests, infrastructure tests actually run real code and touch the real environment. A real environment is complicated and full of dependencies on compute, networking, storage, etc.
How to Find Active Directory Admin Accounts Authenticated by RODCs
Introduced in Windows Server 2008, read-only domain controllers (RODC) were a secure way to deploy DCs in remote locations. RODCs were read-only which meant that nothing could be directly written to them. This meant that a malicious attacker couldn't add his own user account and have it replicated back to all of the other DCs in an environment. It was much more secure than traditional domain controllers which allowed someone with the appropriate permissions to add objects at will to Active Directory.
How to Connect to SQL Server from Linux
In a perfect database administrator world, everything would be the same. All servers would be identical and run the same workloads. They're easier to manage. But, that's not the case. Nowadays, System administrators have to manage different environments. This couldn't be more evident in need to perform SQL queries from a Linux machine. In this post, you'll learn how to connect to SQL Server from Linux!
How to Manage and Automate AWS EC2 Snapshots with PowerShell
Amazon Elastic Block Store (EBS) is a service that provides storage for Amazon EC2 instances. EBS is what every volume on your EC2 instances runs on. When you rely on a service to run important infrastructure it's wise to ensure that data is backed up. In this blog post, learn how to manage and automate AWS EC2 snapshots using the PowerShell scripting language.
How to use Python on Linux to Query Windows WinRM Hosts
PowerShell Remoting was a huge time-saver when it was introduced with PowerShell v2. Although PowerShell Core has introduced support for SSH, it's still possible to connect to Linux hosts over WinRM from Windows hosts using Python. In this blog post, you're going to learn how to connect to Windows hosts over WinRM using Python on Linux.
How to Check for a Pending Reboot in the Registry (Windows)
Whenever you install software, updates or make configuration changes, it's common for Windows to need a reboot. Many OS tasks sometimes force Windows to require a reboot. When a reboot is pending, Windows add some registry values to show that. In this blog post, you're going to learn how to check for a pending reboot and how to build a PowerShell script to automate the task.
Windows 10: Hibernate vs Sleep
When you leave your Windows 10 computer, it's important to ensure it's not simply left powered on. There's no need to add unnecessary charges to your electric bill. If you're going to come back to it soon you probably don't want to simply shut it down completely. You'll then have to wait for it to boot back up. Luckily, you don't have to.
How to Rename Amazon S3 Folder Objects with Python
To rename a folder on a traditional file system is a piece of cake but what if that file system wasn't really a file system at all? In that case, it gets a little trickier! Amazon's S3 service consists of objects with key values. There are no folders or files to speak of but we still need to perform typical file system-like actions like renaming folders.
Using PowerShell to set DNS search order on Windows
Do you need to set the DNS search order on a whole bunch of workstations or servers? Do you have PowerShell? Then you're in luck because I'm about to show you how to use PowerShell to set DNS search order on lots of machines at once!