Words: 448 Time to read: ~ 2 minutes A while ago, I was asked about Automation and told a story about my friend James. In that story I talked about Constrained Endpoints and how, by using them, I could do a take the best bits of automation & delegation and not have to worry about … Continue reading "Updating the Account Password for my Constrained Endpoint"
In the early days of my career, I had the epiphany that “Best Practices” really do not exist or apply to most scenarios. It should be all driven by logic and common sense in the end. What makes much more sense is to find the standard /common practice compares to the mythological unicorn of “best … Continue reading "PowerShell: When and Where Writing Logs Matters"
Windows and reboots - more than a few candles have been burned on both ends in understanding and resolving this relationship. Like it or not and despite Microsoft’s efforts - Windows is the most rebootiest operating system around.
There has to be a ton of code written around this - is it possible add a new contribution of real value?
I think it is - by being concise around my specific context of software deployment automation for DevOps in the cloud with a brutal eye to compactness.
Do you want to know the secret to make a six-figure income in your job, or loving the job that you do? The secret is simple. It’s just giving a shit. The secret is just caring about what you do. Just Care I had a conversation with someone working on a help desk yesterday, and […]
The post The Secret to a Six-Figure Income and Career Success appeared first on Adam the Automator - DevOps, Automation, PowerShell.
I've been using PowerShell for a long while now using Hashtables, OrderedDictionary, and other types of data types in PowerShell, but I never paid attention to how powerful those are. And I don't mean your general knowledge about hashtables that is already covered by Kevin Marquette in his article Everything you wanted to know about Hashtables or my article PowerShell – Few tricks about HashTables and Arrays I wish I knew when I started.
Calling All PowerShell and DevOps Authors, Presenters, Bloggers, and Enthusiasts!The Call for Presenters (authors) is open for “The PowerShell Conference Book: Volume 2” until Friday May 31 at 11:00 PM EST. We are looking for one chapter per author on the topics of PowerShell and DevOps. All proceeds for the book will go to the PowerShell + DevOps Global Summit OnRamp Scholarships.Those interested should submit a chapter abstract to the PSConfBook 2 CFP form at http://bit.
What we care about
Point to a pipeline and index
Do some more client side processing
Whew! It’s been about 2 weeks since the 2019 PowerShell + DevOps Global Summit - the first conference I’ve played a role in organizing. It was super fun, and it was an honor to get a chance to help with content for the summit… that said, it’s been a nice two weeks of recovering!
A lot of folks asked what I do nowadays! I gave my usual :headtilt: computers? response, but the gist of it is, while I still do quite a bit with PowerShell, I have a bunch of other building blocks to design solutions with! One of the more fun ones has been Elastic Stack.
Earlier this week, Chris Gardner presented a session on “Managing dependencies in PowerShell” for the Mississippi PowerShell User Group. I mentioned that I had written a function to retrieve PowerShell module dependencies that’s part of my ModuleBuildTools module. Get-MrAST is one of the primary functions that numerous other functions in the module are built on. It retrieves the AST from one or more PS1 and/or PSM1 files, script blocks, or random arbitrary code.
Few days ago I received a request to restore a dozen of tables because someone have deleted more data than it was supposed. I immediately thought about dbatools for the job! NOTE: I also thought about SSMS “Import/Export Data”. And this is ok when someone says “it’s to run just once, just now”. When you […]
Probably you had the need to script out some objects from a SQL Server instance/database and this is quite easy. You just need to right click on the object (well…not on every single one, try it with an Availability Group :-), no script option available) select “Script XXXX as” and you have it. But have […]
Creating Service Accounts is an especially tedious process when we need to create a lot of those for different purposes, mainly driven by the least privilege access across environments, projects, deployments or simply different clients. So why don’t improve this? Let’s make it all more fun, efficient and less error-prone, so let’s automate it! Let’s … Continue readin
Words: 1,858 Time to read: ~ 5 minutes It’s T-SQL Tuesday time and this time we have Matthew McGiffen ( blog | twitter ) who is asking us about a Puzzle Party! Let’s see what exactly he is asking us though. • Present a puzzle to be solved in SQL and challenge your readers to … Continue reading "T-SQL Tuesday 114 – Puzzle Party"
It's no secret that nobody likes creating documentation. I don't like it, and you don't like it, even documentation lovers don't like it. But while you can live without documentation, you really shouldn't. And I am not talking here only about documentation that is only useful in the onboarding process of new employees or documentation concerning introducing someone to some concepts to get them easily start.
With Powershell V7 on the verge, the importance of building solutions that are cross-platforms in Powershell is bigger. One of the issues we have while running tests, is that our Powershell environment is not "clean" as in other computers. That's where Powershell Core in a container gets in the picture.
The post Running Powershell Core in a container appeared first on Saggie Haim.
Words: 462 487 Time to read: ~ 3 minutes TL;DR: [System.Collections.Generic.HashSet<T>] It has been a while ago since I’ve blogged so it seems fitting that this post will be about a question that was asked of me a while ago. The question was along the lines of “Can I join objects in PowerShell but remove … Continue reading "Is there a UNION in PowerShell"
Not all files can be held in GIT. Not everyone uses GIT. And then the chaos creeps in - I'll just copy this folder to be sure.
Or maybe you’re trying to clean up your photo collection Let me copy this here, and I will look through it later.
Sometimes file name changes - then looking is even harder. I’ve decided to make a hash (md5 for speed) of every file and compare hashes. If they match - I’ll add file full path to a hashtable (again - speed).
A few weeks ago I was trying to figure out how to sort something in PowerShell with one property sorted descending and another one ascending. How to accomplish this was hiding in plain sight in the help examples for Sort-Object, but I thought I would documented it here for future reference. Use the Property parameter with a hash table to specify the property names and their sort orders. This same command can be written on one line.
In January, I published the first release of the PoShDynDnsApi module to the PowerShellGallery,
along with a blog post introducing the module. It was the culmination of months of
often-distracted work that began nearly a year prior.
In this post, I want to give you a peek into my development process.
Below are the topics that I will cover in this post.
Dyn Managed DNS Service
Managed DNS API
PowerShell Web Cmdlets
Changes Between Windows PowerShell and PowerShell Core
Dyn Managed DNS Service
When I first started working on this module, I had access to Dyn’s Managed DNS through an employer.
My most recent update to my PowerShell module PSSpeedTest was to split its Pester test files into separate files for each individual public and private function (see this pull request). After all of the tests had been separated as desired, the test for private function Remove-iPerf3 was throwing a suspicious warning at the end of its execution and the test for Remove-SpeedTestServer was failing entirely.
This week I returned to PowerShell Summit in Bellevue for the second straight year, and as a speaker nonetheless! Last year was my first year at Summit, and it was so amazing I immediately planned on returning so I was very happy to be reunited with my industry buddies. Presenting I have been active in+ Read More
The post PowerShell Summit 2019 – The Sequel appeared first on WinSysBlog.
I had a project to package the CIS CAT Pro benchmark auditing tool for Windows and Linux. The unique Windows challenges I experienced are applicable anytime you either need to extract Java for Windows or extract any gzipped or tar archive on Windows - without using 7zip. CIS CAT Pro requires Java and I wanted to create a zero footprint Java install that could be cleanly wiped out by deleting a folder.
This is my first blog post in a good while and I’m coming back to report on my experience over the past week at the PowerShell + DevOps Global Summit 2019! I first heard about the PowerShell Summit when I started learning PowerShell a couple of years ago, and this year was the first time I’ve attended. I attended as part of the OnRamp track, which is a mostly separate experience from the general conference.
Here’s my PowerShell.org posts for April 2019 — enjoy! April 2019 Build In Measure-Command – April 3, 2019 It’s Official Contributing Writer – April, 8, 2019 Get-History Modified – April 10, 2019 Switch-Prompt 1.2.0 – April 29, 2019
In today's world, people expect to be able to commit one change, then have the entire project re-deployed and automated tests run against it. Using the SSIS PowerShell Provider to deploy your code can help you accomplish that.
Olá Pessoal, O Plaster é um gerador de arquivos e projetos baseado em modelo escrito em PowerShell. Seu objetivo é simplificar a criação de projetos de […]
O post Usando o Plaster para criar novos Módulos apareceu primeiro em Guido Oliveira.
So my team and I, we generate a significant number of virtual machines in any given time period. One of the things we usually struggle to do is to name our machines something unique. For the most part, we don’t care exactly what we are creating is named, we just care that the name is unique. Of course, we have DNS and our netowrking configured in the environment to route traffic to more friendly names, but we still need to name all of our virtual machines.
There are many different ways to deploy an RMM agent to monitor end-user machines and servers. A popular option is Group Policy, also some RMM tools have the ability to do a subnet scan, but I wanted to try and do it with PowerShell while also ensuring I do not have any false positives. I wanted PowerShell to do the following tasks:
Check if a machine is online
Check if WinRM is available and configured correctly
Check if LabTech was already installed
Copy install file locally
Check if program installed
Keep note of the installed machine
Below is a basic tree overview of the runtime flow.
“I’m just not going. I don’t need to go anyway.”, I explain to my wife. “But you always love this conference when you get there. You’ll be fine once you get on the plane. I want you to stay, but I think you need to go.”, she says. That is the typical conversation my wife […]
The post An Introvert’s Struggle with Anxiety and Air Travel appeared first on Adam the Automator - DevOps, Automation, PowerShell.
While the title of this blog may be a bit exaggeration, the command I'm trying to show here does it's best to deliver on the promise. What you're about to witness here is something I've worked on for a while now, and it meets my basic needs. If you don't have SIEM product or products that monitor who does what in Active Directory this command makes it very easy, even for people who don't have much experience in reading Event Logs.
PowerShell Summit North America 2019
A Shipwright an artisan skilled in one or more of the tasks required to build vessels. A SHiPSwright is an artisan skilled in one or more of the tasks required to build PowerShell Providers. The SHiPS toolkit has been around for a while but it can be a little difficult to get started.
@GlennSarti I've been meaning to look into SHiPS! This really helped!!!https://t.
ICS Cube Product Review This post is regarding ICS Cube product review. ICS Cube is an internet gateway and UTM solution. The aim of ICS Cube is to secure your network externally and internally from...
Do you work with PowerShell. In this Blog you will find a lot of information to help you out with it.
PowerShell Summit North America 2019
Previously in “Beyond Pester 101: Applying testing principles to PowerShell” I talked about unit and integration testing with Pester and PowerShell. Now that we’re all experts there, it’s time to tackle Acceptance testing, also known as End to End testing.
Acceptance test is the bread and butter for User stories and defining your MVP.
I recently saw a blog article on “How to Identify Process ID for SQL Server Services? – Interview Question of the Week #185” written by Pinal Dave. While his answer is simple with TSQL, what if you’re not a SQL guy? You can also retrieve this information with PowerShell from Windows itself. When it comes to retrieving information about Windows services with PowerShell, the first command that comes to mind is Get-Service.
In my posts about using Azure Devops to build Azure resources with Terraform, I built a Linux SQL VM. I used the Terrafrom in this GitHub repository and created this Connecting with MobaXterm I had set the Network security rules to accept connections only from my static IP using variables in the Build Pipeline. I […]
Gotta Love the gottchas
So here’s the story. I have a test Hyper-V cluster of 5 nodes - all HP Proliant DL 380 G7 connected to HP MSA2040 and HP P2000 arrays.
It’s been working quite fine as a test environment. Recently I’ve decided to update drivers and firmware to newest version available in SPP P03093_001_spp-Gen8.1-SPPGen81.4 (2019 edition).
Patching went well, nodes rebooted, cluster operational, failvoer cluster manager working and reporting no issues, VMs running.
Recently there was this discussion on PowerShell Group on Facebook about issue posted by one user. While the subject doesn't matter for this post, few people commented on the idea that he was using Format-Table in the middle of the pipeline to do something. They all said Format-Table should be used as last in the pipeline. Otherwise, you would get the wrong output. But should it? Well, it depends!
The post Does having Format-Table or Format-List in the middle of the pipeline makes sense? appeared first on Evotec.
If you're using VSCode with Powershell extension, you probably got used to PSScriptAnalyzer giving you all kind of tips on optimizing things. It makes your code better. Chris Bergmeister does a great job working on it. One of the tips PSScriptAnalyzer gives you when you use $null on the right side of the comparison.
The post The curious case of $null should be on the left side of equality comparisons PSScriptAnalyzer appeared first on Evotec.
A few days ago, I posted an article that demonstrated a number of PowerShell techniques and concepts that you could use to clear out obsolete locations in your %PATH% environment variable. For those of you new to my blog I want to make sure you understand that I often use a scenario, such as this […]
Check out my PowerShell Essentials page https://jdhitsolutions.com/blog/essential-powershell
I’ve been working more with different people in different departments more and more lately at work. “Great” you might say and I would agree with you. This has meant that any and all scripts that I write to give to these departments have to be tested so that they don’t fail when they are run. … Continue reading "When does a Failing Pester Test return Green?"
Some time ago I’ve posted how to set AD environment for BitLocker and retrieve keys from AD. I’ve missed one spot though. For that to work you had to be:
Member of local adminstrators on your machine.
I’ve updated that post with proper information how to fix that - delegate proper permission to SELF object.
Today I’d like to share some quick-dirty scripts to automate even more:
If you’d like to backup BitLocker key to both AD and AzureAD at the same time, here’s a sample script.
As you may have seen in my other post, there's a simple, PowerShell way to get Office 365 Health Service data for you to use any way you like it. But before you can use that, you need to register granular permissions on your Office 365 tenant so that that data is provided to you. Here's a step by step way to do it.
The post Preparing Azure App Registrations permissions for Office 365 Service Health appeared first on Evotec.
Office 365 is an excellent cloud service. But like any service, there's some infrastructure behind it that has to be cared for. Since this is Cloud, Microsoft does this for you. But any problems Microsoft has to have some impact on your end users. And you may want to have that visibility for your users. Microsoft provides this to Admins when they login to the portal, but while useful you may want to use that data in other ways than those planned by Microsoft.
I’ve recently been called out a couple different ways on Twitter about my comments around requesting to be paid for user group and conference talks and my strategy at referring those brand new to PowerShell to other resources instead of helping them directly. Here are a couple highlights from a couple people. “I have personally […]
The post Community vs. Self-Employment: The Struggle appeared first on Adam the Automator - DevOps, Automation, PowerShell.