In your work environment, there’s typically always that legacy thing that no one wants to touch. It’s old, fragile and bound to break at any moment. Volunteer for Misery A problem crops up with this product and a junior staff member, who does not know about the history, comes around and says, “I can take this on; no problem!”. While the senior employees think he’s nuts, he goes in and amazingly fixes the problem with this legacy product with no downtime.
On some days… I just want full on project redo. It’s amazing how many decisions you’d make differently in those initial project meetings, once you’ve begun delivering results. Why, oh why, did we allow for hyphens in project names!? Here’s my problem and how I fixed it. Let’s say we have four projects and their […]
If you’ve used the Azure Resource Manager (AzureRM) PowerShell module much, you may have noticed it may sometimes behave strangely. In this post, I’m going to share one that had me stuck for longer than IRead More...
It recently became apparent that I need a way to determine if I’m on an AWS TST (Test) EC2 instance, or a PRD (production) EC2 instance. The reason this is necessary is so that I can include a function to upload a file, or a folder, to an S3 bucket and ensure the portion of […]
I’ve often talked about the benefit of including Verbose output in your PowerShell scripts and functions from the very beginning. This is especially helpful when someone else is running your command but encounters a problem. You can have them start a transcript, run your command with –Verbose, close the transcript and send it to you. […]
In this article, I will discuss two simple methods to improve PowerShell remoting security. The first is by temporarily increasing the local administrator privileges. The second is by changing the password automatically in the script. One of the aspects of PowerShell I use the most is running remote tasks on […]
The post Increase PowerShell remoting security with two simple techniques appeared first on WinSysBlog.
I want to discuss a little bit about meetings and mental health and really sticking to goals. To go over this, I want to tell you a small story, a story about meetings. We’re all in meetings, usually, if you’re in IT or in any corporate job at all, you’ve probably gone to a meeting. Meetings are abused Meetings are traditionally the bane of a knowledge worker’s existence. Meetings have a bad rap because people just think that we should meet for everything.
This blog post was created from the transcript of my YouTube #CarTalks video called To Script or Not To Script? That is the Question. Be check out the YouTube channel and subscribe! When to script and when not to script is our topic for today. I know myself and my audience; we’re all about scripting. We want to write PowerShell scripts for everything, but, unfortunately, it’s not always the best decision to do so.
I will be speaking at the PowerShell and DevOps Summit 2018 on the topic of Setting Up Your Own Private, Secured Package Repository
Abstract: Security and availability are good defensive reasons to curate public packages into a private repository, but there are many positive reasons as well! We will cover the benefits of a dedicated, private repository, as well as enabling secure, global reach and an analysis of repository options.
Have you ever noticed that some people use StringBuilder in their PowerShell scripts and wondered why? The whole point of using StringBuilder is to concatenate or build large strings. There are ways to do this in PowerShell already, so why would someone turn to this DotNet object? They are trying...
Debugging ist eines der wichtigsten Dinge, egal in welchen Editor gearbeitet wird. PowerShell Studio liefert hier einen großen Funktionsumfang. zum Layout In den Layouts die mitgeliefert werden ist eine Debug-Ansicht vorhanden, mir persönlich gefällt diese nicht, da sie nicht übersichtlich … Weiterlesen →
If you’ve been creating scopes in Exchange Online in, for instance, following way…: $Group = Get-DistributionGroup -Identity “RoomImpersonationGroup” New-ManagementScope “Room Mailboxes Impersonation” -RecipientRestrictionFilter “MemberOfGroup -eq ‘$($Group.DistinguishedName)'” …so using a DistinguishedName attribute – you might experience a moment when this solution stops to work.
Today, we are going to talk about the Microsoft MVP program, more specifically how you can become a Microsoft MVP. If you’re not familiar with the Microsoft MVP program, it is a reward and a program that’s built around the reward that’s presented to IT professionals, software developers – different people from all walks of life, around Microsoft products. They’re especially focused on various categories in Microsoft.
Mass Dismount Another day – another dirty – quicky. So you’ve got a bunch of hosts and some VMs there. Some of those have iso files attached. Some of them shouldn’t. Especially if that ISO is not accessible for all nodes in the cluster. You can get an error like this Now, getting vm after … Continue reading Hyper-V Remove Lingering DVD iso
When trying to get a meeting set up with someone, does this email thread sound familiar? If so, this Calendly review post is for you. Email #1: “What time is good for you?” Email #2: “I’m open between 2-5PM on Thursday.” Email #3: “Is that your time or my time?” Email #4: “CST” Email #5: “Nah. I can’t do that. What about 1PM PST?” Email #6: “I think that should be OK.
When it comes to making sense of data intelligently, programming can help significantly. PowerCLI combined with some PowerShell is a great weapon to use for this purpose. In this article, I will show a few examples of where PowerCLI is the best tool to use for advanced tasks in vSphere. […]
The post PowerCLI examples for advanced VMware tasks appeared first on WinSysBlog.
Recently, while migrating IIS websites to a new server, I encountered “Service Unavailable HTTP Error 503. The service is unavailable.” errors, but only for HTTPS, while HTTP worked fine. Depending on the scenario, the problem could have just as easily impacted HTTP. The server was listening on port 443: If you ever encounter a problem like this, stop the web publishing service: Then check to see if the server is still listening on port 443: If it is, then something else is running that’s listening on port 443.
The PowerShell Start-Sleep cmdlet or the sleep alias is a simple cmdlet with a single purpose; to pause a script. When executed, in the PowerShell console, a script executed by the console or in the PowerShell ISE, the cmdlet pauses merely a script or module in the PowerShell session from running until the required time in seconds or milliseconds have elapsed. This cmdlet is simple yet can be applied in a few different ways that will allow us scripters to greate well-written scripts.
Hyper-V error: Checkpoint operation failed. Checkpoint operation was cancelled. General access denied error 0x80070005. Veeam error: ‘ServerName’ could not initiate a checkpoint operation: General access denied error (0x80070005). Sometime after VM migration between hosts, when one host suddenly goes out, few problems can appear. Sometimes two VMs shows up on Hyper-V host with the same
Copying files. It’s not sexy but has to be done. In the GUI, we copy and paste with the clipboard but in PowerShell we have a cmdlet called Copy-Item. Commands for copying files have been around forever in all shell languages. In PowerShell land, the most popular way to get a copy of a file or folder in your PowerShell script from point A to point B is by using the PowerShell Copy-Item cmdlet.
Every once in a while, I see someone ask for a way to track changes to something. It reminds me of a script I wrote once to track changes made in Active Directory. Twice a day, my team was emailed with a report showing all the user account, group membership,...
So just recently we got need of checking RDMA ping between nodes, and as we got a few the task of running nb_send_bw.exe was getting a little fiddly. As we were waiting for repair storage jobs to finish between restarts I wrote a few lines to automating task. As you might know Mellanox got this … Continue reading Automated way to check Mellanox RDMA ping (nb_send_bw.exe) across nodes in a Hyper-V cluster.
I've worked on a couple of Powershell automation frameworks, that are always-ON, which is basically a bunch of scripts continuously running on a machine to monitor, test, build or for any other possible use case. One can check the live status of these scripts by logging onto the box and resize-drag-arrange any spawned script or application properly on the screen so that they don't overlap so that you can read them properly, which I personally found very irritating.
Windows 2016 S2D – Balance VMs Reload! Another day – another dirty – quicky. If you have a Windows 2016 Hyper-V cluster and a bunch of VMs you may have noticed an effect of auto balance feature. It evaluates a node’s load based on some heuristics and then moves compute resources to a better node. … Continue reading Windows 2016 S2D – Balance VMs
IT professionals rarely work just on our local computer. Using the PowerShell Invoke-Command cmdlet, we don’t have to! This cmdlet allows us to seamlessly write code as if we were working on our local computer. By using the PowerShell Remoting feature, The Invoke-Command cmdlet is a commonly used PowerShell cmdlet that allows the user to execute code inside of a PSSession. This PSSession can either be one created previously with the New-PSSession cmdlet or it can quickly create and tear down a temporary session as well.
If you’ve been following this blog recently, you’ve read about my fun with PowerShell type extensions. This technique lets you make PowerShell give you the information you want without a lot of work on your part. Well, there is some work but you only have to do it once. To make it even easier, I […]
Just a small reminder for myself… Remember kids, storage jobs are only visible when running ISE or PowerShell console as an admin! Safest is to always check the status of the jobs with invoke-command, as my dear colleague told me today, when using invoke you use the highest privileges:
Forgotten this recently and got caught spending some time investigating. Boys and girls, remember one thing – if you create role assignments like this: where “IMPERSONATION ADMINS” is your a security group created by you – this role assignment will NOT be visible in your “admin roles” area in Exchange Console: Instead, you need firstly … Continue reading Exchange – two ways to create new role assignments.
Just today my wonderful colleague showed me a great way to restart machine and at the same time – test if it has came up and is operational (basically if PowerShell responds remotely). Use -force to forcely logoff any active sessions (savage!!!!) After performing restart in above way, console waits and will not go further, … Continue reading How to properly reboot machine with PowerShell.
“I don’t have time”. What these people mean when they say they don’t have time – especially when they say they don’t have time to automate, is that they genuinely don’t want to. Perhaps people don’t believe they have the chance to automate. Whatever the case may be – automation takes time to see any benefits. However, the current mindset is focused on immediacy rather than into the future; particularly in management.
We’re going to talk about how to learn PowerShell or how to learn some other language that you’d like to learn. First and foremost, the way to learn is not to watch YouTube videos, to not read articles, to not do online training courses, to not do physical training courses, to not read about PowerShell or any other language. The real way, the only right way to learn about PowerShell is to learn by doing.
Occasionally I’ll come across a system with PowerShell version 2.0 on it that I need to run a remote command against which needs access to local variables. I can never remember how to accomplish that task so I thought I would write a blog about it as a reminder for myself and others who may find themselves in the same scenario. I’ll demonstrate each of the available options and whether or not they work on PowerShell version 5.
So just recently I’ve been asked by Microsoft support to perform a change in the registry to avoid getting many local failure email messages saved in local OST. The instruction how to do it, can be found under (In our case the solution didn’t work at all by the way): https://answers.microsoft.com/en-us/msoffice/forum/msoffice_o365admin/how-can-i-stop-synchronization-logs-from-being/ece4da42-c641-4a73-a026-999bbfe78a76?auth=1 As you might see … Continue reading How to access HKEY_CURRENT_USER registry entry remotely.
Over time I’ve found there are many reasons why I may be asked to debug systems I do not have convenient access to.
It is painstaking to get lists of diagnostic information in circumstances such as these because it requires a lot of information relaying and lag times.
In the past, I have done a survey of the available options for systems information utilities to help get a dump of a system’s configuration information.
If you’ve been following along on the blog recently you’ve read about my use of PowerShell type extensions. This is a way of adding new properties to things I use all the time. The goal is to save typing and get what I need with minimal effort. You can also take this a step further […]
A few weeks ago I spoke at the Arizona PowerShell Saturday event where I introduced the newest version of my Advanced Function template — the 2.0 version. You can check it out here: http://tommymaynard.com/an-advanced-function-template-2-0-version-2017. It’s headed toward 200 downloads — not bad. Well, there’s going to need to be a newer version sooner rather than […]
Lately I’ve been writing about my use of PowerShell type extensions as a way to get more done quickly. Or at least give me the information I want with minimal effort. I use Hyper-V a great deal and the Hyper-V cmdlets are invaluable. And while a command like Get-VM provides a lot of information, I […]
IntroI am writing this next blog post in this series much sooner than I had anticipated. I wanted to do so in order to clarify a few things about PowerSMells and to address some of the negative feedback I have received. I will still include a PowerSMell, but this is mostly to address shortcomings in the Part 1 of the series.Table of Contents for this seriesPowerSMells are Not About Best PracticesOne of the misunderstandings from my previous post was about the core nature of PowerSMells.
So you are new to PowerShell. You are enjoying the experience of getting to know the language but you still have a sh*t ton of questions. You are constantly googling stuff like “Get-ADUser” and “PowerShell pipeline”. Don’t worry, you will get there. Perhaps one of the best things you can […]
The post Beginners guide to the PowerShell community leaders appeared first on WinSysBlog.
Over the course of the last year I’ve been using markdown files much more, especially as part of the Platyps module. Even though I have a markdown editor and I can also preview files in VS Code, sometimes I want to see the file in my browser which has a markdown viewer plugin. Or I […]
There’s a number of things that - as a non-American - can cause confusion when
dealing with America:
Imperial rather than Metric units of measurement,
Words missing the letter ‘U,’
A number of these applies to systems or software developed in America. The last
one specifically, dates, is the subject of this short post.
When dates don’t go as planned
Before getting into things, I wanted to thanks Dan
Blank for inspiring this post during a
conversation we had on Twitter.
If you have an Exchange mailbox, you have the option to configure Out of Office messages when you are away from work:
Usually, the default options is sufficient: You configure a message, a time range, and you are all set.
In my scenario, I am having a paternity leave for the next 20 weeks where I will work 50% during the work week. This means I will have to turn Out of Office on and off several times every week.
Ab und an kommt es vor, dass die Sicherheitsbestimmungen von Gruppen oder anderen AD-Objekten angepasst werden müssen. Für ein einzelnes Objekt mag das gehen, aber wenn dies für sehr viele umgesetzt werden muss, macht das per Hand keinen Spaß. Am … Weiterlesen →
To create a virtual machine in Azure requires the configuration of several different components. You need to consider a Resource group,
Storage options, a virtual network then the virtual machine itself! To set all these components you need to know what they are;
A Location, Storage types, Operating systems…
To make this process easier for myself I created my AzureRM.VM.Tools PowerShell Module. I wanted to share this in the
hope it might help someone else.
Recently I’ve been struggling with a few issues on Veeam Backup for Microsoft Office 365, still struggling with one, but fortunately can post an update about two that has been resolved. Jupi! Okay, so I got this error going on on Veeam: 30.10.2017 07:21:17 :: Job started at 30.10.2017 08:21:17 30.10.2017 07:21:17 :: Connected … Continue reading Veeam Backup for Microsoft Office 365 and “Failed to synchronize item changes.
It has taken some discipline but I have finally gotten the hang of using the command history file maintained by PSReadline. Even though Set-PSReadlineOption has a few options on how to use this file, in my experience I have felt the need to handle a few things on my own. Here’s my take. I have […]
I recently watched fellow Microsoft MVP Thomas Rayner present a session on regular expressions for the MVP Days virtual conference. Sometimes it’s the little things that are the biggest takeaways for me when I’m watching others present. One thing that wasn’t related to regular expressions that I noticed was Thomas’s way of preventing his entire script from running if F5 was accidentally pressed instead of F8 in the PowerShell ISE (Integrated Scripting Environment).
IntroA few weeks ago, someone in the slack channel asked what some of the Code Smells are in PowerShell. If you are not familiar with the term Code Smell, a simple definition is code that when you see it you know there will be issues just like when you smell something rotten know you will find something unpleasant. After some joking around the term PowerSMell was coined to describe a Code Smell particular to PowerShell.