Technology Solutions for Everyday Folks

Tagged with 'powershell'

Exporting Group Policies in Bulk with Powershell

A project cropped up recently that required editing a number of disparate Group Policies in our environment due to a network share path change.

I was originally given a list of GPOs that were (somehow) identified as in scope for change; however, I knew immediately the list was incomplete and omitted some valid matches. So I was left with a choice:

Read More

Using Powershell to Send a Teams Notification from a Task Sequence Step

Screen snip of a completed task sequence Teams notification

The last two posts were inspired by conversations at MMS Flamingo and focus on using Slack as the communication/receiver for notices relayed from a Task Sequence step and

Read More

Triggering a Slack Notification on Completion of a Task Sequence

Screen snip (sanitized) of a completed task sequence Slack notification

A number of years ago I started having my primary OSD Task Sequences "check in" as one of their last steps. Specifically check in with key information so I can follow up as necessary ("trust but verify") with downstream actions to ensure our asset management systems are properly updated.

I chose a Slack webhook to accomplish this as I could set up a quiet channel for notifications and queue them for later review (once a day or a few times per week).

Read More

Export CM Collection Member Details to CSV

A script snippet I use all the time (and which gets a lot of search traffic) is something I wrote in 2020 about exporting AD computers to CSV with Powershell. Along those lines, another cmdlet I use all the time … usually for inventory/asset management … is to obtain collection data from the SCCM/MEMCM/MECM/CM ecosystem.

Read More

Addressing Firmware Updates for Dell Latitude 54X0 in a Task Sequence

Screenshot of a child task sequence for updating firmware in Full OS mode, with a Run PowerShell Script step highlighted with package and script information.

For about two years we fought with getting firmware (BIOS) updates to install on our Dell Latitude 54X0 models during their build/rebuild using a MEMCM task sequence. No matter what random trick I tried or thing I read, I just couldn't get the update executable to successfully apply the update in our primary build/refresh task sequence. Our techs (self included) would have to apply the update manually after devices were [re]built.

Read More

Semi-Automatically Offering Dell BIOS/Firmware Updates

Photo of Dell firmware update in progress instructing a user not to power down the system and showing a progress bar with basic status information.

Several years ago I implemented a mechanism in our primary [re]build [Configuration Manager/MEMCM/SCCM] task sequence to address upgrades of our fleet's firmware (BIOS). On the whole, the process has worked very well and definitely helped keep things updated. However, this process only upgraded device firmware during a [re]build cycle which works great for our multi-user devices receiving an annual refresh; for high-affinity devices a rebuild happens once every 3-5 years and is usually associated with some form of attrition or replacement.

Read More

Powershell String Manipulation - A One-Liner

See also: asking a friend for help can save oodles of time and effort.

Around Thanksgiving 2022, an friend of mine asked to talk through a problem he thought might be solvable with Powershell, but he'd been stuck on the design. Naturally, I agreed to help out if/where I could and it provided an opportunity to chat via Zoom which I am not one to turn down.

The Problem

In this case, there's a relatively free-form bunch of text received from a person/process whose behavior is unlikely to change. A couple of things that are consistent in this data:

Read More

Keeping the Wireless On - Script the Reconnect

Electric arc between two plasma globes

In our classroom fleet, almost all devices are wireless-only for their network access. This as a design is great for mobility and flexibility and the user experience but presents its own set of very unique challenges on the technical side. At various times and for a wide range of reasons, we encounter the situation where devices "lose" their wireless/Wi-Fi connection. Resolution usually involves dispatching a tech to the space or walking a user through, under most circumstances, simply "reconnecting" to the proper SSID.

Read More

Quick Tests of WQL Queries

Recently I was working on a clean-up/improvement project in the MEMCM (SCCM) console which required some WQL query work and updates. In particular, I was fiddling with some collection queries to segment some areas for a process improvement project coming up. That's intentionally vague, because the 'why' in this case doesn't really matter. What does matter is that I needed WQL to give me proper results.

Read More

Quickly Extracting Icons with Powershell

One of the things I both love and loathe is adding the little icon to an advertised deployment in the Software Center console of SCCM/MEMCM. As many have said it in the past, "Pretty Counts" and I wholeheartedly agree.

Read More

Auto-Power On Dell Workstation

Cartoon characters join together with "Let's Power Up!" as a caption.

As we begin another academic year, this time in a pandemic, we're providing more virtual/remote desktop access to computer lab and public-access workstations for those in need. We're starting by using the machines taken out of general service due to physical distancing requirements. These workstations are still powered on, but we've removed their keyboards, mice, and fiddled with their monitor configurations (along with basic signage) indicating they are not in service (at the console/in person).

Read More

Count of AD Groups Ranked by Members

A cartoon/drawn group of random people

A week ago, someone on one of our more generalized Slack channels asked if anyone knew how to make AD Users and Computers (ADUC) filter mechanism rank output based on a group membership count. Now, I don't necessarily understand (or honestly, care) about the particular use case, but I knew the answer was going to be 'no, that can't be done by way of the GUI.' Which was the first part of my answer.

Read More

Powershell Exports AD Computers to CSV

Road sign reading "Export"

A couple months ago I wrote about using Powershell to find and export AD records for the purposes of our Windows 7 End-of-Life project. This post is effectively a second in a series of 'exporting computer records from AD with Powershell' if you will.

Read More

Powershell to Find and Export AD Records

Frantically searching through report data

With the very near end of life for Windows 7, as we work through the last bit of known and managed machines to upgrade or replace I find myself needing to do more frequent "searches" of AD computer object records for analysis.

Read More

Visual Customizations for Windows 10 in OSD

Windows logo

As we work through the tail-end of our Windows 7 fleet (January 14, 2020 is coming if you haven't heard...), I've found myself rolling a different type of hammer process for the last of the "upgrades." This past week as I was tweaking what amounts to an in-place update (by way of wipe and load) for Windows 7 to Windows 10, I was reminded of how Past Me was indeed awesome (and inspired) since this simple script with all the various background and image sizes still works in Windows 10 19XX deployments.

Read More

Tales From The 'Duh!' Archive: Command Syntax

Cartoon character pushes zombie back into grave

I had a very long week, which means I'm writing a short post this time around.

Among several seemingly disparate things I accomplished in the last week or so, I spent some time deploying applications via SCCM (soon to be called Microsoft Endpoint Manager/Configuation Manager/#MEMCM per the announcement at Ignite this week).

Read More

Collection Variables in SCCM Task Sequences

Hello my name is {X} tag

As I've mentioned a number of times in previous posts, on our campus we perform a roughly-annual refresh of multi-user workstations across the institution. This 'multi-user' scope includes machines in classrooms, computer labs, open learning spaces, conference rooms, and so forth.

Read More

Environment Context Troubleshooting

Dashed and dotted lines

Broken Context(s). The story of my weekend project.

Due to a number of reasons, mostly well outside my direct control, I spent part of this weekend working through the application and task sequence refresh process for our multi-user workstations...which will need to be finished by August 27.

Read More

Auto-Determine Primary IP Address

IPv4 address representation in dotted-decimal notation

One of the things I've baked into our production task sequence for "multi-user devices" is a secondary way to automatically determine a device's use case while in the WinPE stage. The primary, preferred way to determine use case is by the use of SCCM collection variables, but those require a known object (in the proper collection) to function as designed. Thus, for all rebuilds of known devices, the use case is figured out by collection variable.

Read More

Windows Scheduled Tasks with Powershell

Mechanical Mathematical Calculator

As I struggled to find looked for inspiration for this week's post, I wound up looking within...oddly enough as I was reconfiguring my email out of office response (the below is what I had for my time at MMS):

Read More

MMS: Drinking From the Fire Hose

Drinking from the fire hose

I spent last week at MMSMOA, a conference I cannot recommend enough for anyone working in the Microsoft/Windows/Systems Management space. The main event, held at the Radisson Blu Mall of America, is a solid four-and-a-half days of deep technical material, networking, sharing, and more!

Read More

Does the Performance Matter?

Does it matter?

Back around 2015 or so, I wrote a simple Powershell script which basically re-populates Active Directory (AD) group membership based on data procured from our central systems. Two primary AD groups in particular are synchronized to our print management system, PaperCut, which pre-provisions accounts and access so folks handling monetary transactions don't have to create accounts, etc.

Read More

Auto-Generate OSD Computer Name

Typos Happen

Last summer while re-designing and upgrading our primary task sequence for the "multi-user devices" in our fleet (computer labs, learning spaces, etc.), I decided to tackle what had become a bit of a perennial problem: device naming.

Read More