Azure Devops Custom (Errors) Messages in emails and Job reports

One of the common feature request for Azure Devops is to have a custom messages in emails. It could be great feature, but currently we have some options – so let’s see them one by one. The code: – task: Bash@3   inputs:     targetType: ‘inline’     script: |       echo “##vso[task.logissue type=error]Hello world!”       echo “##vso[task.complete result=Failed]” produces the following report (we see the message), and email (we see the message): The code: – task: Bash@3   inputs:     targetType: ‘inline’     script: |       echo “##vso[task.logissue type=warning]Hello world!”       echo “##vso[task.complete result=Succeeded]” produces the following report (we see the message), and email (we do not see the message): The code: – task: Bash@3   inputs:     targetType: ‘inline’     script: |       echo “##vso[task.logissue type=error]01Beginning of a group…Warning message…Error messaage…Start of a section…Debug text…Command-line being run!”       echo “##vso[task.logissue type=error]02Beginning of a group…Warning message…Error messaage…Start of a section…Debug text…Command-line being run!”       echo “##vso[task.logissue type=error]03Beginning of a group…Warning message…Error messaage…Start of a section…Debug text…Command-line being run!”       echo “##vso[task.logissue type=error]04Beginning of a group…Warning message…Error messaage…Start of a section…Debug text…Command-line being run!”       echo “##vso[task.logissue type=error]05Beginning of a group…Warning message…Error messaage…Start of a section…Debug text…Command-line being run!”       echo “##vso[task.logissue type=error]06Beginning of a group…Warning message…Error messaage…Start of a section…Debug text…Command-line being run!”       echo “##vso[task.logissue type=error]07Beginning of a group…Warning message…Error messaage…Start of a section…Debug text…Command-line being run!”       echo “##vso[task.complete result=Succeeded]” produces the following report (we see the message), and email (we see the message):

Build your own Copilots with Microsoft Copilot Studio – Step By Step LAB from #MSBUILD 2024

Learn how you can build your own copilots with Microsoft Copilot Studio. In this workshop you’ll learn how Copilots can be created for use across the business. You’ll also see how you can create custom plug ins that can integrate with custom solutions. We’ll then show you how you can use Generative AI for even more intelligent responses. The source code used in example: https://github.com/MariuszFerdyn/Build-your-own-Copilots-with-Microsoft-Copilot-Studio

Intune Script that can create new local admin user – helpful if LAPS fails

Remediation script: # Create the new local userNew-LocalUser -Name $newUsername -Password $newPassword -FullName “New User” -Description “This is a new user account.” # Optionally, add the user to a group (e.g., Administrators)Add-LocalGroupMember -Group “Administrators” -Member $newUsername # Output a success messageWrite-Output “User $newUsername has been created successfully.”

Via Intune fix – The trust relationship between this workstation and the primary domain failed

On machine where you see trust relationship is broken, log in using last credentials, but without network. In this way it should be possible. We are saving them to avoid storing AD credentials in Intune. $adminUsername=”xxxxadjoinuser” $adminPassword=”xxx” #$cred = New-Object PSCredential $adminUsername, ($adminPassword | ConvertTo-SecureString -AsPlainText -Force) New-Item -ItemType Directory c:aaaa Get-Variable admin* | Export-Clixml c:aaaavars.xml #Import-Clixml c:aaaavars.xml | %{ Set-Variable $_.Name $_.Value }     You can also do this in this way, all in Intune Script but password will be stored in Intune, but without any access to affected machine   $adminUsername=”xxxxadjoinuser” $adminPassword=”xxx” $cred = New-Object PSCredential $adminUsername, ($adminPassword | ConvertTo-SecureString -AsPlainText -Force) Test-ComputerSecureChannel -Repair -Credential $cred  

Azure DevOps Export Variables Group – GUI

As you probably notice there is no GUI to export the Variables Groups, but there is a very nice API that can be called directly from your browser. So simply call https://dev.azure.com/{organization}/{project}/_apis/distributedtask/variablegroups?api-version=5.0-preview.1 like: https://dev.azure.com/xxx/AppGeatewyBicep/_apis/distributedtask/variablegroups?api-version=5.0-preview.1 It display all the Variables Groups in Azure DevOps like: To display one Variable Group and Export it use this: https://dev.azure.com/{organization}/{project}/_apis/distributedtask/variablegroups/{groupId}?api-version=5.0-preview.1 like https://dev.azure.com/xxx/AppGeatewyBicep/_apis/distributedtask/variablegroups/4?api-version=5.0-preview.1   More info here.