My favorite part of my IT work is finding a way to automate, speed-up, and take away busy work. We end up purchasing about 50 new workstations each year. A few years ago we invested in a product that was supposed to speed up our workstation image deployments. It made it easy to build an image, but unfortunately deploying that image still meant a lot of walking around to PCs, backing up settings, and then loading those settings back in.
Disclaimer: Before we get too far, let me say that there’s no exact checklist to follow to become a Microsoft MVP. If you’re looking for a list of tasks to follow to the T, you will not get it in this post. Being chosen to be an MVP is a fuzzy topic and one that’s ultimately up to Microsoft;, not [...]
The post How to Become a Microsoft MVP appeared first on Adam, the Automator.
Beim Anwenden des Programms PowerShell ist es notwendig, dass Arbeiten mit Objekten zu beherrschen. Grund dafür ist, dass in fast jedem Skript auch selbst Objekte erstellt werden müssen. Wobei jene auf verschiedener Art und Weise erstellt werden können. Als Beispiel … Weiterlesen →
GitHubReleaseManager GitHubReleaseManager is a PowerShell module that wraps up GitHub’s Releases API. It allows users to automate releases of their software by via the command line or by integrating the module in to build tools such as PSake. About The idea came about while working on another community project. Every release consisted of a number of manual tasks, one of […]
The post Using GithubReleaseManager to automate GitHub releases appeared first on HELLOITSCRAIG.
I got trolled on a social network after encouraging someone to continue to learn how to do testing in PowerShell with Pester. I said, in the end, understanding how to test your code and prove it works makes you better at what you do. I listed what I thought were pros to testing and got called out that I was making things up.
I don’t remember where I saw the example (see The Code below). I believe it was a Kent Beck book on testing from a decade plus ago (if someone recognizes it, let me know).
We were having a conversation recently at work about server naming conventions and it reminded of an article where the author was using a mnemonic word list to name servers. After a little digging, I was able to track it down. Index Index A proper server naming scheme Oren Tirosh’s...
Today’s Friday Fun post, as most of these are, is a little silly and a little educational. Because I obviously am avoiding getting any real work accomplished, I worked on a little project that would add a border around a string of text. I often write formatted text to the screen to display information and … Continue reading "Friday Fun: Crossing the Border with PowerShell"
I recently received an email from someone who attended one of my presentations asking if I had a blog article on using PowerShell to compact and optimize VHD files. Since I didn’t have a blog article on that subject, I decided to create one. The process itself is fairly simple. The examples shown in this blog article are being run on a Windows 10 computer which has Hyper-V enabled on it. Only specific SKU’s of Windows 10 are capable of running Hyper-V.
You can use the UserAccountControl property of an Active Directory user object to enable and disable all kinds of neat functionality: https://support.microsoft.com/en-ca/kb/305144. One of the things you can enable is for a user to have no passwordRead More...
Last Friday I presented at the PowerShell Meetup of the Microsoft User Groups based in Singapore. Having been a speakers at the PowerShell Conference Asia, which is also held in Singapore, for the past two years, it was nice to virtually be present in the Microsoft offices again. The session I prepared was on the […]
I just emailed Richard Siddaway and informed him I was not going to be attending the PowerShell Summit. The Summit is the conference I love going to every year but this year was different. I love meeting other people, talking tech and when I’ve finally made it up on stage presenting my ideas on how to make our careers better. [...]
The post Dealing with Workaholism and Anxiety appeared first on Adam, the Automator.
Defining an Output Type for a function is a useful way to inform other users or tools about what to expect once the function has been executed. While doing some research I came across the documentation for the OutputType attribute and noticed that it’s possible to set an Output Type per Parameter Set. You can use […]
The post Defining multiple Output Types in a function appeared first on HELLOITSCRAIG.
Last week I pushed an update for the
BurntToast PowerShell module to the
This update, version 0.5.2, exposed the ability to add custom buttons to your
toast notifications instead of just the standard Snooze and Dismiss option from
This dramatically increases the flexibility and usability of these PowerShell
In an effort to show off the cool things you can accomplish with BurntToast, and
to demo new features as they come out, I’ll be writing a series of ‘Croutons.
Saving data to files is a very common task when working with PowerShell. There may be more options than you realize. Let’s start with the basics and work into the more advanced options. Index Index Working with file paths Test-Path Split-Path Join-Path Resolve-Path Saving and reading data Basic redirection with...
Umgebungsvariablen sind hilfreich und liefern eine menge Informationen. Wie zum Beispiel den LogonServer und die Domäne. [crayon-58dc478c31a97391352035/] Nicht selten werden Domänencontrollerfür Skripte benötigt. Viele lösen dies mithilfe der Umgebungsvariablen. [crayon-58dc478c31aa5350378720/] Für Skripte ist dies aber nicht der praktikabelste sein. Besonders wenn … Weiterlesen →
Pester has a interesting secret feature that we need to talk about. It supports Gherkin-style feature specifications. I had no idea this was even a thing until I was looking at one of Joel Bennett’s modules and saw something I had not seen before. This feature allows you to define...
If you’re interested in some free PowerShell training, I’ll be presenting two PowerShell sessions at SQL Saturday #593 in Birmingham, Alabama this Saturday, March 18th. My first one hour presentation begins at 9:40am central time and is geared for beginners. The content covered in this session is based off of a book by the same title that I’m currently writing. PowerShell 101: The No-Nonsense Beginner’s Guide to PowerShell Interested in PowerShell but not sure how to get started? Already have some experience but still having trouble with the basic concepts? This session is for you! Learn to easily figure out what the commands are and how to use those commands without searching the Internet.
Last Thursday, 9th March 2017, I was presenting at the 10th DuPSUG meeting. Unfortunately, because I had to much manual actions in my demo, I couldn’t finish it. That’s way I will describe a full run of the New-LabEnvironment module in this blog post. This will also be the last blog post regarding functionality of the module. On which subjects I will continue to blog? You’ll find out at the end of this post.
Recently, I had a customer looking at setting up potentially tens of thousands of Point of Sale Kiosks running Windows 10 on an LTSB branch. We wanted users to have to input their password, but noticed that if a Windows… Continue reading →
PowerShell v6 Alpha 17 has been released and contains an interesting change with the version parameter when applied to powershell.exe. Some discussion around it can be found here and here. When using a Linux based shell, supplying the version parameter returns the version of the shell: View the code on Gist. You can now do … Continue reading powershell.exe version parameter →
A few days ago I posted an entry that explained how to create and use snippets in Visual Studio Code. As mentioned in that article I’m attempting to make the transition to VSCode for all my PowerShell work. Being able to use snippets is just one feature that I rely on. And as a number … Continue reading "More Fun with VSCode Snippets"
One of the things that I found the most challenging when learning how to create Resource Manager templates was trying to understand which API versions to use for my resources. The documentation is pretty clear and states that most of the time we should be aiming for the latest API version. It also contains examples showing how […]
The post Quickly list supported API versions for ARM resource types appeared first on HELLOITSCRAIG.
Last Thursday we hosted the tenth Dutch PowerShell User Group at Rabobank in Utrecht. It was another full day event starting at 9AM and finishing at 6PM. For this event, we had a diverse range of speakers and as a highlight we had Jakub Jareš visit our user group and giving two presentations on proper […]
When I was working on my DSL, I found that I had to be more creative with my advanced function implementations than I do with normal advanced functions. When it comes to writing a script CmdLet, there are lots of community standards and expected behaviors already defined. When creating a...
It gets tedious connecting to all of the Office 365 PowerShell components. MSOnline, Exchange Online, Skype for Business Online, and more – they all need to be connected individually. This isn’t always so bad day-to-day, but when you have a...Read more
Dieses Beispiel ist vielleicht mit Kanonen auf Spatzen geschossen, aber es reist ein sehr interessantes Thema an. Bei dem Kopieren von Ordnern frage ich mich ab und an, was für Dateien eigentlich kopiert werden. Mit Hilfe des Schalters WhatIf wird … Weiterlesen →
So I’ve recently moved my daily work to a different laptop, a Yoga 900 with 16GB of RAM to be exact. I had been running Windows 8.1 but decided to jump in completely to a Windows 10 environment. As part of the process I’ve also made it a goal to begin using Visual Studio Code … Continue reading "Adding PowerShell Snippets to Visual Studio Code"
Applies to: Windows PowerShell 5.0
In a previous blog post I walked through the setup of an HTTPS pull server, at the time of the writing there was only one way to setup a pull server with HTTPS. Since that blog post was published, Microsoft has released another version of the Pull server which I’ll refer to as version 2. The offical Microsoft documentation for setting up a pull server can be found here.
In the beginning, there was PS C:\>_
I have been a regular PowerShell users for years.
Probably about a decade now and I avoided customizing the shell on my workstation for the vast majority of that time.
Despite PSRemoting being a thing for almost the entirety of PowerShell’s existence now.
For one reason or another, I would usually end up RDPing into a server just to open PowerShell.
I did not want to become dependent on modules like PSReadLine or console emulators like ConEmu for fear I would be handicapped when I had to use PowerShell on another system.
At long last it is finished! Don Jones and I have recently published the first iteration of The PowerShell Scripting and Toolmaking Book. This project was first announced in January 2017 with an early release program. The first edition was finished and in reader’s hands by the end of February 2017. We appreciate all of … Continue reading "PowerShell Scripting and Toolmaking –
This morning, I published Chapter 4 of my new book, PowerShell 101: The No-Nonsense Beginner’s Guide to PowerShell. The book now contains chapters one through four and is forty percent complete. The book will contain a minimum of ten chapters when it’s completed later this year. Interested, but not ready to commit to purchasing it? Chapter 1 is available as a free download and I’ve created a video that demonstrates many of the concepts covered in Chapter 1.
While studying for the 70-533 exam I decided to take a deep dive in to the Disk encryption feature provided by Azure. Azure Disk Encryption uses BitLocker for Windows or DM-Crypt for Linux enabling users to encrypt OS and data disks of Azure Virtual Machines. It turns out that it’s not just as simple as […]
The post Automating Azure Disk Encryption with PowerShell appeared first on HELLOITSCRAIG.
While working on a couple future posts for my Release Pipeline Series, I stumbled onto a very interesting feature in the VSCode Task system. These tasks are called Watcher Tasks or Background Tasks. The documentation has an example of a TypeScript watcher task that uses the tsc --watch command to auto compile the project when a modified file is detected.
These Tasks can also implement Problem Matchers like a normal task.
This idea came to me with a book i’ve just started reading by Charles Petzold. The book is called ‘Code’.
It was actually the front cover of the book, the word Code written and below it binary code underneath each letter. How could i convert
letters to binary ? Even better could I convert my name to Binary ?
The first part of the script was a function that prompted for a name. This was quite neat and it was something new to me as well.
At work we’ve recently ramped up our use of Trello to
manage our tasks. It’s great, and I recommend anyone that works with lists of
any description to give it a look. The only problem is, how does one show off
the work the team has coming up, what they’re working on, and what they
have ticked off?
You could just bring the Trello board up on a TV or laptop, but nothing
distracts a room full of nerds faster than technology.
It's pretty obvious that our Get-MITUser cmdlet isn't yet as visually usable as Microsoft's cmdlets. You can always modify the formatting of a cmdlet by piping it to a Format-* command. First of all this is inconvenient to have to do each time, but also the output of this isn't your original object but an entirely different formatting object. You can no longer operate on it as an object. For example try obtaining the DisplayName from an object that has been formatted - it won't work.
I have just released a new version of the AzurePublicIPAddress module (0.8.) to the PowerShell Gallery.
There are no major changes, just the additional support for the new Korea Regions:
You can get the module from:
I am not sure how many times I have written a script to generate server lists for Microsoft’s Remote Desktop Connection Manager (RDCMan). I find that it is a very easy script to write many different ways. Writing a Domain-Specific Language (DSL) to generate RDCMan files may not be the...
Visual Studio Team Services
Lately I started using Visual Studio Team Services to see how I can leverage it instead of Jenkins for projects/builds where I do not necessarily need any of the hundreds of community plugins that are available for Jenkins.
As most of what I do has to do with PowerShell I want to start blogging about some of my findings with VSTS and PowerShell.
If you do not know what VSTS is, then here is a quick explanation:
VSTS is an Azure hosted service that provides teams with Project Management tools like Scrum/Kanban boards and backlogs, Packagemanagement feeds, and also Continuous Integration services and Release Management.
Do you blog about PowerShell? If so, consider adding your blog site to Planet PowerShell which is an aggregator of content from PowerShell Community members. There are some guidelines for submission on their GitHub page so be sure to take a look at it before continuing. Instructions for adding your blog also exists on that page, but I’ve recently seen a number of tweets about it being too difficult or too much work.
Pardon the long title. I had a task recently to go through a big folder full of scripts written by random people with equally random skill levels. Lots of the scripts had a -Verbose parameter, butRead More...
This script will accomplish 3 things; configure a pull server, create a basic configuration to be pulled by a target node, and create a Local Configuration Manager configuration for the target node. Execute the following code on the Pull Server: [crayon-58dc478d19a56808529628/] [crayon-58dc478d19a67549963929/] Execute this code on the Target Node: [crayon-58dc478d19a6d194125665/]
We have large SQL tables, and contractors work for us which require them to have access to the data. The data is sensitive. One approach taken was to duplicate the tables and remove contents of the sensitive fields. This approach is time consuming, so it runs a schedule off hours. Not very agile.
My colleague, Gaspare Bonventre, came across Dynamic Data Masking.
SQL Database dynamic data masking limits sensitive data exposure by masking it to non-privileged users.
In Part 4, we created our basic Get-MITUser function, which accepts a single $Identity parameter, and will obtain both the MsolUser and Mailbox (assuming they exist). Now it’s time to test with some real fake data – in particular we...Read more
I always considered myself a Powershell purist. A DSL (Domain-Specific Language) written in Powershell abuses all the rules that I have grown to embrace. I recently found myself building a module that was implemented as a DSL and I really like how it turned out. Not only that, but I...
I got started with PowerShell thanks to the encouragement and enthusiasm of a friend and former colleague. Following that, I've largely developed my knowledge through the standard combinations of trial + error + googling and more recently (as is evident) by doing my best to engage with and give back to the