Skip to main content

Posts

Showing posts with the label powershell

Creating Global Conditions in System Center Configuration Manager for Office 365 deployments

Creating Global Conditions in System Center configuration Manager for Office 365 deployments Firstly I would recommend reading the Microsoft docs article below. https://docs.microsoft.com/en-us/sccm/apps/deploy-use/create-global-conditions Software Library  >  Application Management  >  Global Conditions . Scenario: I have an AD group " SD-LSG-Comp-Microsoft Project ClickToRun"  with computer objects that should install Office 365 -  ProjectProXVolume edition. I wanted to create one application with multiple deployment types depending on their AD membership. For example if the computer is only a members of the  " SD-LSG-Comp-Microsoft Project ClickToRun" AD group then the deployment should only run the deployment Type " Office 365 Default Deployment Type-Install_InstallProject.cmd ".   This deplyoment Type calls the Office 365 setup.exe with a configuration xml detailing the  <Product ID="ProjectProXVolume">. (For a det...

Office 365 Activation Troubleshooter SCCM Application

Scenario: I wanted to package the Office 365 Activation Troubleshooter ( Officeact.diagcab ) for Office 365 users with activation issues. I needed to find out the commands to use as well as the appropriate Detection Method. 1. Download: Officeact.diagcab https://aka.ms/diag_officeact 2. Create a PowerShell (Diagnostics.Office365.ps1) script to call the officeact.diagcab file. See example below 3. Create an SCCM Script application calling the Diagnostics.Office365.ps1 script powershell -ExecutionPolicy Bypass .\Diagnostics.Office365.ps1 Select the Detection Method tab and select radial next to "Use a custom script to detect the presence of the this deployment type". Select the Edit option on the right and set the script type to PowerShell and the script content as appropriate to the application. The script below will look at all running processes and filter out all processes that equal msdt; if a process matching this string is found the client will return an exit code of 0 ...

SCCM Software Update - Job error 0x80004005 Failed to Add Update Source for WUAgent

SCCM Software Updates - Failed to Add Update Source for WUAgent  Today I have been looking at a range of servers (Server 2008 /R2 2012 /R2) that were failing to communicate with the Software Update Point (SUP) in SCCM and retrieve deployment policy. The UpdateDeployment.log was reporting the Job error 0x80004005 Job error (0x80004005) received for assignment ({af7a48e6-d550-4070-dd9b-ecc234567584}) action UpdatesDeploymentAgent 12/6/2017 10:32:27 AM 2096 (0x0830) The WUAHandler.log  was reporting "Unable to read existing WUA Group Policy object" and "Failed to Add Update Source for WUAgent " Unable to read existing WUA Group Policy object. Error = 0x80004005. WUAHandler 12/6/2017 3:41:00 AM 2828 (0x0B0C) Failed to Add Update Source for WUAgent of type (2) and id ({3AAB6A76-CE2D-4E8A-9F11-123AE69612A1}). Error = 0x80004005. WUAHandler 12/6/2017 11:03:31 AM 2276 (0x08E4) Until the agent can report back to the SUP, SCCM will not be able to summarize Software Update sta...

App-V 5X application not discovered. A supported App-V 5X client is not installed

SCCM Task Sequence with App-V application " A supported App-V 5X client is not installed" Scenario: Windows 10 (1607) Task Sequence with various MSI and App-V applications. During an SCCM Task Sequence I am attempting to install an App-V application however, at the end of the build MSI installations have installed but App-V application has not been installed. AppDiscovery.log    Performing detection of app deployment type MathWorks_MATLAB-R2014a_8.3.0.532_001A - Download..... +++ App-V 5X application not discovered. A supported App-V 5X client is not installed. Resolution: With Windows 10, version 1607, the App-V client is installed automatically however, it needs to be enabled before you can installations App-V packaged within a Task Sequence.  This can be achieved by adding a command line to you Task Sequence to run Windows PowerShell command. powershell -executionpolicy bypass -command Enable-Appv

Customize the Windows 8.1 Start Screen during MDT task sequence Enterprise deployment

Customize the Windows 8.1 Start Screen during MDT task sequence Enterprise deployment For enterprises, Windows 8.1 delivers the control around the Start Screen that should have been there in Windows 8.0, there’s still no programmatic way to pin or unpin shortcuts from the Start Screen. Windows 8.1 introduces a Group Policy method for distributing a Start Screen layout, but that’s a policy – i.e. it’s enforced that approach only makes sense in specific cases (e.g. schools, kiosks etc.). Note that Start Screen control is only available in Windows 8.1 Enterprise and Windows RT 8.1 Microsoft have an article available on TechNet that describes a number of ways that you can configure the default Start Screen experience that will work for Windows 8/8.1, Window Server 2012 and Windows Server 2012 R2, but the choices are: 1.Create a reference image and use the CopyProfile setting in unattend.xml to customise the default profile including the Start Screen 2.Use the StartTiles s...

Customize the Windows 8.1 Start Screen during MDT task sequence Enterprise deployment

Customize the Windows 8.1 Start Screen during MDT task sequence Enterprise deployment For enterprises, Windows 8.1 delivers the control around the Start Screen that should have been there in Windows 8.0, there’s still no programmatic way to pin or unpin shortcuts from the Start Screen. Windows 8.1 introduces a Group Policy method for distributing a Start Screen layout, but that’s a policy – i.e. it’s enforced that approach only makes sense in specific cases (e.g. schools, kiosks etc.). Note that Start Screen control is only available in Windows 8.1 Enterprise and Windows RT 8.1 Microsoft have an article available on TechNet that describes a number of ways that you can configure the default Start Screen experience that will work for Windows 8/8.1, Window Server 2012 and Windows Server 2012 R2, but the choices are: 1.Create a reference image and use the CopyProfile setting in unattend.xml to customise the default profile including the Start Screen 2.Use the S...

PowerShell Find specific text within a string, with a list of partial file names. $_.split

Recently i was looking for a way to select all the text between two brackets and ignore everything else in the string.  This was necessary as i had a list of partial file name and i wanted a way of matching my list with a directory listing. The use of '$_.split' command achieved this very nicely. How to i select specific text in a string? $text='this is an (apple). it is red' #The variable $text contains the word 'apple' between two opposite brackets. $text|%{$_.split('(')[1]}|%{$_.split(')')[0]} # $text is piped into a foreach loop spliting the string, removing everything before the first bracket (. It is then piped into a second foreach loop removing everything after the second bracket ).                                    apple # On scre...

PowerShell Find specific text within a string, with a list of partial file names. $_.split

Recently i was looking for a way to select all the text between two brackets and ignore everything else in the string.  This was necessary as i had a list of partial file name and i wanted a way of matching my list with a directory listing. The use of '$_.split' command achieved this very nicely. How to i select specific text in a string? $text='this is an (apple). it is red' #The variable $text contains the word 'apple' between two opposite brackets. $text|%{$_.split('(')[1]}|%{$_.split(')')[0]} # $text is piped into a foreach loop spliting the string, removing everything before the first bracket (. It is then piped into a second foreach loop removing everything after the second bracket ).                                    apple ...

How to sign a powershell script

How to sign a powershell script http://blogs.technet.com/b/heyscriptingguy/archive/2010/06/16/hey-scripting-guy-how-can-i-sign-windows-powershell-scripts-with-an-enterprise-windows-pki-part-1-of-2.aspx http://blogs.technet.com/b/heyscriptingguy/archive/2010/06/17/hey-scripting-guy-how-can-i-sign-windows-powershell-scripts-with-an-enterprise-windows-pki-part-2-of-2.aspx $cert=(dir cert:currentuser\my\ -CodeSigningCert) Set-AuthenticodeSignature demoscript2.ps1 $cert -TimestampServer  http://timestamp.comodoca.com/authenticode My PKI root is called  pki.harper.labs , and it is already trusted by my domain members, as shown in the following image. I will follow these steps: Make the code signing certificate template available on my issuing certificate server. Request a code signing certificate for my user. Sign my Windows PowerShell script and run it. Deploy the code signing certificate as a trusted publisher through Active Directory. Step 1: Make the code signing certificate temp...

How to sign a powershell script

How to sign a powershell script http://blogs.technet.com/b/heyscriptingguy/archive/2010/06/16/hey-scripting-guy-how-can-i-sign-windows-powershell-scripts-with-an-enterprise-windows-pki-part-1-of-2.aspx http://blogs.technet.com/b/heyscriptingguy/archive/2010/06/17/hey-scripting-guy-how-can-i-sign-windows-powershell-scripts-with-an-enterprise-windows-pki-part-2-of-2.aspx $cert=(dir cert:currentuser\my\ -CodeSigningCert) Set-AuthenticodeSignature demoscript2.ps1 $cert -TimestampServer  http://timestamp.comodoca.com/authenticode My PKI root is called  pki.harper.labs , and it is already trusted by my domain members, as shown in the following image. I will follow these steps: Make the code signing certificate template available on my issuing certificate server. Request a code signing certificate for my user. Sign my Windows PowerShell script and run it. Deploy the code signing certificate as a trusted publisher through Active Directory. Step 1: Make the code signing certificate temp...