Photo by Farrel Nobel on Unsplash Welcome to another edition of T-SQL Tuesday! This T-SQL Tuesday is hosted by Wayne Sheffield ( blog | twitter ) and he has asked us to talk about […] a time when you ran up against your own brick wall, and how you worked it out or dealt with it. Hitting The Wall When stuck in a problem […]
A couple of days ago, one of my kids asked me “What day of the week will it be in 11 days from now?“. My response was “I’m not sure, but I can tell you how to figure out the answer for yourself“. Open up PowerShell, wrap Get-Date in parentheses, place a dot or period afterwards, followed by AddDays, then 11 in another set of parentheses, and finally another dot or period followed by DayOfWeek.
Welcome to the 293rd post on tommymaynard.com. It’s countdown to 300! If you’ve ever looked into Pester and TestCases, then maybe you’ve seen what I’m about to mention. While today’s post has nothing to do with Pester, this feature in Pester uses an array of hash tables. Neat, right? While adding a couple New-PSDrive commands […]
PowerShell Saturday Chattanooga was this past weekend. I attended the all-day preconference presented by Jeff Hicks on Friday which saw a great turn out of about 50 people or so. I presented two 45-minute sessions as part of the Saturday event. One on “Writing award winning PowerShell functions and script modules” and another on “Recreate MOF based DSC resources as Class based DSC resources“.
Get Group Membership Changes Scenario: Get Group Membership Changes There are sometimes that we would like to know when a member has been removed or added in groups in Active Directory. The script that we will discuss below, is checking groups to find out if any member has been added or removed from groups based...
The post Get Group Membership Changes appeared first on Stephanos Constantinou Blog.
I'm happy to announce that Planet PowerShell is now enforcing HTTPS for all aggregated sites. I gave some extra time for authors to make the change. In the end only 3 authors opted out of moving to HTTPS, so I'm happy with the result.
I've been making some changes to how CloudFlare cache settings.
PowerShell Automatic Variables In this tutorial we will see about PowerShell Automatic Variables. As Microsoft describes, these variables store state information for PowerShell. They are created automatically and maintained by PowerShell. Ideally, PowerShell Automatic Variables are considered to be read-only. Although you are able to write to them, you should avoid writing to those variables...
The post PowerShell Automatic Variables appeared first on Stephanos Constantinou Blog.
Invoke-VMScript allows you to run PowerShell, batch, and Bash scripts on remote VMware virtual machines from PowerShell. Not only that but since you are actually authenticating to vCenter or ESXi, it does not require network connectivity to the server you want to run the script on. VMware has long supported the use of PowerShell for managing+ Read More
The post Using Invoke-VMScript for running remote scripts on VMs with PowerCLI appeared first on WinSysBlog.
Now that we know how to provision machines, I want to dive deeper into KeyPairs and how we can connect.
When working with on perm machines, credentials are easy.
Traditionally all you have to pass is your domain credentials and go.
While you can extend active directory to the cloud (or use a hosted version), this is becoming less and less common.
Let’s dig in and see how we can use key pairs to create credentials and connect.
I recenty had an idea for module that I wanted to implement as a binary module. I have yet to create one using the PowerShell Standard Library so this felt like a good opportunity. I was able to use the Creating a cross-platform binary module guide to create this module...
I love PowerShell. It has been the single most important skill I have learned in my career as it has allowed me to benefit and grow financially and skill-wise. I care deeply about the community and perhaps more importantly about the future of this beloved language. Starting at the next PowerShell Summit in Bellvue, the+ Read More
The post The Future of PowerShell is in the Youth appeared first on WinSysBlog.
PowerShell Type Operators In this tutorial we will see about PowerShell Type Operators. Thee operators are able to check if a value is a specific type of data or try to change the data to the specific type. There are only three PowerShell Type Operators. Below is the list of the operators: -is – Returns TRUE...
The post PowerShell Type Operators appeared first on Stephanos Constantinou Blog.
Today, many applications and devices connect to Active Directory over LDAP. Many of those are still performing unsecure LDAP “simple binds” where credentials are transferred in clear text over the network. Those exposed credentials typically include the “service account” used to connect to LDAP, but also include the user credentials used during the application login. […]
One of the companies that I support is currently in the process of migrating from an on-premises Exchange Server environment to Office 365. They’re currently running in hybrid mode. While it seems like wanting to know what mailboxes still exist onsite versus which ones are in the cloud would be an all too common task, there doesn’t seem to be an easy way to get that information with PowerShell.
PowerShell Try Catch Finally In this tutorial we will see about PowerShell Try Catch Finally. We will see what it does and some example on how we are able to use it. It is used to handle and respond to terminating errors. When a terminating error occurs, Windows PowerShell will stop running a script or...
The post PowerShell Try Catch Finally appeared first on Stephanos Constantinou Blog.
A Question Shortly after the European PowerShell Conference and the PowerShell and Devops 2018 summit in the USA Mike Robbins b | t contacted me with a question. Interested in writing a chapter in a PowerShell book? I was intrigued and read on. A Conference in a Book There was more to this book than […]
Amazon CloudWatch is a monitoring service for Amazon Web Services (AWS) that provides robust monitoring of your entire AWS infrastructure resources and applications. It can collect data, gain insights, and...
The post Publish AWS CloudWatch custom metrics with PowerShell appeared first on Ridicurious.
PowerShell Wildcards In this tutorial we will see about PowerShell Wildcards. Wildcards can be used in cases you want to match multiple characters. Wildcards are used to create patterns in your commands. For example when you are trying to filter results wildcards can be useful by creating a pattern of characters to match. Below is...
The post PowerShell Wildcards appeared first on Stephanos Constantinou Blog.
Get EventLog Event Details Content PowerShell
Windows eventlog are great to log data. Search inside them is quite easy with the EventVwr.msc management console. But search through them programmatically can be a bit tricky. Especially when you want only some key information from the event.
Get EventLog Event Details Content PowerShell
Let’s take eventid 5719 for example:
Get EventLog Event Details Content PowerShell – Event Overview
As you may agree, the important information there is “D2K16TP4”.
One of the logs that can trace an attacker’s activity is a transcript log. Transcript logs are basically an “over-the-shoulder” method of seeing what’s occurring in any given PowerShell session. It shows which commands the user is running and any output printed to the console. In this article, I will show how to centralize these+ Read More
The post How to centralize PowerShell transcript logs appeared first on WinSysBlog.
Intro I’ve been hesitant to dive into XenServer PowerShell cmdlets, but there’s no rational reason to not do it. Citrix continues to make great strides in expanding and updating PowerShell for XenServer, PVS, and XenDesktop. Today, we’ll go over a function that queries an array of XenServer Poolmasters and returns the total VM count on […]
Welcome to the 292nd post on tommymaynard.com. It’s countdown to 300! Even though we’ve been doing this PowerShell thing awhile, we don’t always write our own solutions. You, like me, just might go looking for someone else’s solution, before spending a few minutes of your own time, writing a solution. I’m guilty. That’s said, there’s […]
Notify Users for Password Expiration Scenario: Notify Users for Password Expiration The script that we will discuss below is about notifying domain users via email when the password will expire. Based on the policy of each company, you set the rules in Group Policy for the password to expire on the specified time. When the...
The post Notify Users for Password Expiration appeared first on Stephanos Constantinou Blog.
A couple of months ago, Josh King presented a session on “Using BurntToast to Display Timely Notifications” for our June 2018 Mississippi PowerShell User Group virtual meeting. I was previously planning to write something to display balloon notifications in Windows and I learned that they’re now called toast notifications. I also learned that Josh had created a module named BurntToast which performs most of the heavy lifting so I could simply take advantage of it instead of writing my own code.
I like to write Pester checks to make sure that all is as expected! This is just a quick post as much to help me remember this script 🙂 This is a quick Pester test I wrote to ensure that some SQL Scripts in a directory would parse so there was some guarantee that they […]
July 25th, the Research Triangle PowerShell User Group will host Jeff Hicks. He will cover implementing PowerShell scripts with Scheduled Jobs. It proves to be an informative meeting. Check more at MeetUp – http://meetu.ps/e/Fynqw/z9BYg/d Thanks, Alain
Back in March, I had the opportunity to link up with Microsoft Cloud Advocate Damian Brady and record an episode of The DevOps Lab. We chatted a little bit about the MVP Summit and being anRead More...
In this post, I would like to provide a detailed explanation of the Get-Command -Syntax output. While the output is documented (the format used is actually called a syntax diagram) I found parts of it rather confusing. As an example throughout this post, we will use the output of the command: The output looks quite […]
The AWS Tools for PowerShell let you manage all your EC2 instances with cmdlets.
With full coverage for machine creation, deletion and updating, virtually all settings are configurable from the PowerShell console.
Let’s dive in and learn to create and manage EC2 Instances from PowerShell!
The Good Stuff:
Check out the AWS Tools for Powershell and start managing EC2 from your shell today
Creating EC2 Instances
Choosing a key pair
Passing User Data
Choosing Security Groups
So Many More Options
Creating EC2 Instances
Creating an EC2 instance with all the defaults couldn’t be simpler.
Some days ago Thomas Rayner (whom I admire for his passion and consistency when it comes to sharing his knowledge) posted about the same topic on his blog. He mentioned a method on how to utilize GitHub in order to find out the earliest Version a PowerShell Cmdlet was introduced. When I read the Thomas’s […]
Regular Expression PowerShell RegEx
Regular Expression is a great concept that can be used by a lot of language. It allows you to recognize string patterns. This is the kind of feature that webmaster use to be sure that you enter your phone number or email address in the expected format.
PowerShell can also use RegEx, thanks to the -match and -Replace operators.
Regular Expression PowerShell RegEx – Match Help
Regular Expression PowerShell RegEx – Detailed Match Help
Regular Expression PowerShell RegEx – Example
'OnlyLetters' -replace '[A-Z]','1'
Regular Expression PowerShell – Example
This is a pretty simple example of letters replacement by number 1.
Now that we have the AWS Tools installed and our shell setup, it’s time to start creating machines.
The most basic and probably most used feature of AWS is EC2.
There are literally thousands of different images to choose from.
With so many options and settings to tweak, finding the right image and starting a machine can sometimes feel overwhelming.
Luckily with the AWS tools for PowerShell, we’ll have everything we need to find the right image.
Yet again, long time no post! .net Format Strings are very useful when it comes to taking control over the output of your scripts. e.g.: The problem with those Format Strings is, that hardly anyone can remember them. While there they are thoroughly documented and several nice folks have created cheat-sheets (e.g. here), I thought […]
I’m proud, grateful, and excited to report that my chapter on Azure Functions in The PowerShell Conference Book has just been published!
We made this book for one reason: We needed a PowerShell version of The Simpsons classic 22 Short Films About Springfield episode.
You are Lisa, and we’re all just trying to help.
Ok, maybe that wasn’t the only reason. Mike Robbins wrote more about the project’s genesis.
Recently, while troubleshooting a problem with a newly installed application, I wanted to see what it was communicating with. My only requirement was that I wanted to use PowerShell if at all possible. I couldn’t remember if there was a PowerShell command for accomplishing this task or not, but I remembered seeing something about it in Patrick Gruenauer’s chapter (PowerShell as an Enterprise Network Tool) in The PowerShell Conference Book.
Do you ever have one of those things that you know, until someone asks you about it? Like when someone asks you to define hegemony, or pernicious. Or in my case when I was talking to some coworkers about using continue and break in a script, and they asked me if I was sure that’s how those worked. Well it turned out I wasn’t, not exactly. I had a pretty good idea about how to use them, and hadn’t run into any major issues, but I realized I couldn’t explain the difference between continue, break, and return, not in any concrete way.
Introduction This is chapter-5 of my Azure Cloud Shell Web Series and today we are discussing – Monaco Editor which is the open source web-based editor that powers the Visual...
The post Monaco Editor – Full Code Editor experience in Azure Cloud Shell appeared first on Ridicurious.
In the PowerShell Slack (invite yourself at bit.ly/psslack), there was a very brief debate over when the Expand-Archive cmdlet was introduced to PowerShell. This is absolutely information that can be found online, but there’s a few differentRead More...
During the time that I spent on a temporary assignment on Blizzard’s End User Computing team, work began on implementing Jamf. Being a global company, Blizzard has more than a few office locations and departments that are all represented across Active Directory. A script that Jamf’s IT team hosts on GitHub enables easy syncing from...
Welcome to the 291st post on tommymaynard.com. It’s countdown to 300! Well, it’s happened. My chapter has gone live in The PowerShell Conference Book. This is one of those moments I’ll never forget. Even so, it may not be entirely for the reason you might think. Sure, I’ve got my name alongside some of the […]
The book is authored by over 30 different contributors who are subject matter experts in different areas and all (100%) of the royalties from “The PowerShell Conference Book” are automatically donated to the OnRamp Scholarship program through the “Leanpub for Causes” program.
sthModuleScope — это модуль, содержащий четыре функции, предназначенные для работы с элементами в области модуля. Если вы создаете собственные модули, где некоторые из функций и переменных предназначены только для внутреннего использования, то этот модуль может помочь при их диагностике и… Читать далее →