Skip to main content

15 posts tagged with "PowerShell"

View All Tags

· 2 min read
Naw Awn

Managing BitLocker recovery keys for multiple devices can be a daunting task without the right tools. I happened to run a project where BitLocker recovery keys were managed by the Sophos Central and somehow I had to port all of them over to Intune portal.

In this blog post, I wanted to share how I did it with the Powershell script. This uses the BitLocker PowerShell Module that comes with the Windows 10 computer. The only pre-requisite is that the computer is either Azure AD Joined or Azure AD hybrid Joined.

· 3 min read
Naw Awn

In today's dynamic technology landscape, maintaining a robust and reliable infrastructure is crucial for businesses to ensure smooth operations. From time to time you will need to install Windows udpates, security patches, required software updates and etc., on your servers and reboot them as necessary.

In this blog post, let's explore the infrastructure test using pester. This is a simple test you can run to ensure the servers are running with required business applicaiton processes and services after the reboot. I happened to write more comprehensive tests script like this when I had to run the test on more than 50 servers in one go.

· 3 min read
Naw Awn

It took me awhile to get around this logic. The Pester v5 script no longer runs in top down fashion. Unlike Pester v4 or older version, Pester v5 runs in two different phases.

In Descovery phase, it gathers all the infomation about the test script and get it ready for the Run phase. Technically speaking, Discovery phase only executes BeforeDiscovery, Describe, Context and anything else outside the It blocks.

· 3 min read
Naw Awn

This has been one on my list to do for a while. What you want to do is test your machine build after the deployment from SCCM, MDT or Intune Windows AutoPilot. The script will check

  • if the machine has the list of software you exptect
  • if the specific file or folder eixsts
  • if the registry key and value pairs are correct
  • if the services are running or stopped

Then send the result (Passed or Failed) to your Microsoft Teams channel via the incoming webhook so that you can monitor the result.

· 2 min read
Naw Awn

This post is about retrieving the MSI file properties from PowerShell. There are some tools if you need to read the metadata from the msi database.

  • Orca
  • InstEd

The script will just loop through all the available properties with value and return the result in PSCustomObject. You can use this script to read the ProductCode of an MSI file before the installation.

· 3 min read
Naw Awn

Every IT admin will need to install the Microsoft 365 Office application at some point. Recently I have been looking for the way to automate the process of downloading the new Monthly release version of office package on to Microsoft Deployment Toolkit (MDT) server. So, the next time the machine is built, it will use the latest office application package.
The idea is to check the release version number from the vendor source and compare it against the one stored on the MDT server. If the vendor source has higher version number, it will then download the new package.

· 3 min read
Naw Awn

This is the PowerShell tool with GUI to display what programs are installed on the remote computer. This is done via the remote registry query. The tool requires the remote registry service to be running on the remote computer.

This post is quite short but the script seems a bit long.
Here is the script logic: The script checks if the remote registry service is running on the remote machine. If it is, the script will extract all the programs installed on the remote computer and display them on the data grid view.

· 4 min read
Naw Awn

Building the tool with Graphical User Interface (GUI) has been one of the tasks I needed much these days. You could write the script to automate some stuff but when you needed to write one for normal users, they would rather double click on the file you sent them. This post is about building the PowerShell tool using the Windows Presentation Foundation (WPF) as a desktop application.

· 3 min read
Naw Awn

This was a small weekend personal project to try out Grafana visualisation tool for a test Hyper-V server. InfluxDB was used for storing the time series database. Since performance counter values are based on a series of event happening over time, it is the best one for what it does. The extra tool NSSM was also needed for running influxdb as a service on Windows machine. To make life easier, I also used the PowerShell module called Influx to feed the data to the Influx database.