Skip to content

ivan

System Administrator Married With daughter That's all folks

SCCM/MECM How to set computer name automatically during Task Sequence

I know it is possible to set the computer name before you start the task sequence by adding the OSDComputerName variable to a collection – usually used in the Unknown Computers collection. I know as well how to generate it based on the serial number of the workstation or laptop. Well, this was not enough for me and I decided that it should be possible to auto-assign computer names during Task Sequence based on the current active directory names. To make it even more fun I was determined to get the next available computer name based on domain naming convention (will shorten this to DNC), but only for computers above 1000. Please, do not ask… Read More »SCCM/MECM How to set computer name automatically during Task Sequence

Simple PowerShell Account Creation script

Recently I was inspired by the excellent Master User Creator, which we cannot use, and I had some free time, so I decided to create something simple, but still useful for my service desk guys. I ended with following script – combination of PowerShell , Mahapps and XAML. Script requires PowerShell 7, installed RSAT tools needed as well.tested on Windows 10 v20H2 and 21H2. It doesn’t work on Windows 10 v1909. I am assuming it won’t work on lower version as well.  To make it work for you change the followoing lines: Line 179 and Line 180 – Change to Correct OU Path Line 215 – your own filters what to be excluded Of course… Read More »Simple PowerShell Account Creation script

Lazy Exchange On-Premises Mailbox Creator

One of the ways to use shared mailbox with exchange is to grant “Full Access” and “Send As” access through security group. With the latest exchange security group must be universal and mail enabled. Recently I had to create bunch of mailboxes and found the process… repeating and boring, then I decided that there must be a way to automate it, since it is repeating the same thing again and again. The end result is the following script/form – what it does in short is: Creates Security Group and Mail Enable it Creates Shared Mailbox (could be done only through PowerShell) in preselected Active Directory OU – for both ,mail group and mailbox In preselected… Read More »Lazy Exchange On-Premises Mailbox Creator

Get size of all items in current path

I was looking for an easy way to get the size of all user profiles folder through PowerShell and found this woshub and inspired by it ended with the following function which measures the size of everything in current path if used without parameter. Made it a function just to be able to autoload it. It’s nothing special, however, it’s surprisingly useful 🙂 If you want folders only it will be: The only difference is Where-Object { $_ -is [io.directoryinfo] }. To switch to Megabytes replace Gb with Mb. Works with PowerShell 3/4/5/6/7.

SCCM Reports Service Account

If you have to change the Report Server service account password (never happens, right?!?) do yourself a favor and before rebuilding the entire report service go to Administration –> Security –> Accounts, double click on the account in question, click SET and enter the new password. Symptoms are: 1. Cannot impersonate user for data source2. Cannot change data source user – you change it and it’s reverting back3. Other logon errors after reporting works for few seconds

Dell Workstations (3630) UEFI Bios settings – no bootable device found

Recently I had to install windows through SCCM and Remote Distribution point with enabled PXE support in remote site which doesn’t have an IT technician available and this turned to a challenge for a regular user. I’m using MDT Task sequence and we support secure boot. In order to make it work few settings in the BIOS needs to changed, the factory default setup wouldn’t work. Under System Configuration Integrated NIC – Enabled w/PXE, make sure that Enable UEFI network stack is checked as well SATA Operation – AHCI Secure Boot – Enabled, Legacy Support Disabled – If your environment doesn’t support secure boot disable it, however, it’s not that hard to support it in… Read More »Dell Workstations (3630) UEFI Bios settings – no bootable device found

SCCM – Change Site Code on multiple computers

If you had to change the sccm client site code on multiple computers (after sccm migration or new/upgraded server installation) nowadays you might have discovered that it’s not as easy as it should be. You could push the new site client to all computers generating a lot of heat to the network or try deprecated wmic (miserably fails). I wanted to avoid mass client push and found that the following quick and dirty script works well: First create a list of all computers using your favorite method, I already have a text file with them so I’ll just use it, it’s named mycomps.txt and it is in my current folder.

PSWriteHTML is awesome

Recently I was playing with the excellent PSWriteHTML powershell module and ended up creating a dashboard from events. Since I had a hard time going through all of the dashboard option, I’ve decided to share what I did, may be it will help someone. The example script requires PSWriteHTML module installed. Event properties I got from here, don’t know is this the original author, anyway, I wish all good to the author, whoever he is! I do not pretend this is the best code ever, however, IMHO it is doing the job right, It works out of the box, just adjust server names ($srv), taking the reboots for the last 30 days with max events… Read More »PSWriteHTML is awesome

SCCM – Upgrade Microsoft Office

Recently I had the task to upgrade Microsoft Office from 2010 to 2016 (I now it’s year 2020 now 🙂 using SCCM. I was thinking that it shouldn’t be a big deal, but…. it turned out differently. There was lync client, custom add-in, old office uninstall failed with random errors… To cut the long story short – this is what I did at the end. All Guid’s credits goes to this guy Create Custom Task Sequence Step 1 – Kill Lync Client – Run Command Line taskkill /f /im communicator.exe /t Step 2 – Kill UCMapi – Run Command Line taskkill /f /im ucmpai.exe /t Step 4 -Uninstall Lync – Run Command Line msiexec /x… Read More »SCCM – Upgrade Microsoft Office