This is a simple PowerShell script that can be used to trigger SCCM client actions remotely using PowerShell. It only currently supports three client actions for simplicity’s sake (MachinePolicy, DiscoveryData, SoftwareInventory) but you can add more as specified here. Usage … Continue reading →
We needed to configure VMWare Horizon client connections for different groups of users in an organisation. Unfortunately the ADMX file didn’t support this configuration, so we needed to implement it using PowerShell. When we looked at the VMWare Horizon view … Continue reading →
I recently needed to find the operating system using PowerShell – preferably the full name (“Microsoft Windows 10 Enterprise”) as opposed to the version (10.0.17763). When researching this I stumble upon lots of ways to achieve this, some more reliable … Continue reading →
This is a simple PowerShell logging function to write a specified message to a log file in the user’s %temp% folder. The file in this example is called Filename.log, but can be renamed as appropriate. function Write-Log { [CmdletBinding()] param( … Continue reading →
We’ve recently experienced issues related to running Powershell login scripts with Group Policy. These were caused by delays in login script execution, and so this post details a more optimal approach to run your Powershell login scripts asynchronously. Group Policy … Continue reading →
This post provides an example of how we can use ADSI to find logon workstations in Active Directory. I recently needed to search through all users in Active Directory and find logon workstations for those accounts that had them. Logon … Continue reading →
When querying Active Directory (AD) we can use a PowerShell type accelerator called the ADSI Searcher and the ActiveDirectory PowerShell Module. Most Google searches provide examples that use the PowerShell ActiveDirectory module cmdlets such as Get-ADUser and Get-ADComputer. Whilst these … Continue reading →
Below is a quick example of how we can insert a VBScript custom action into a Windows Installer (MSI) using PowerShell. Remember that this example does not add the entry into the InstallExecuteSequence table, which will be required to actually … Continue reading →
Have you ever looked at the target of an .lnk shortcut and it appears to be greyed out/disabled? Chances are it is a Windows Installer advertised shortcut, which is used as part of Windows Installer resiliency and self healing. Instead … Continue reading →
I often write administrative scripts and am required to send an email using PowerShell. There are a couple of ways to do this depending on our objectives. If we just require an email then I opt to use the Send-MailMessage … Continue reading →