diff --git a/build/vsts-validate-psscriptanalyzer.ps1 b/build/vsts-validate-psscriptanalyzer.ps1 index c709bd98..98892d91 100644 --- a/build/vsts-validate-psscriptanalyzer.ps1 +++ b/build/vsts-validate-psscriptanalyzer.ps1 @@ -14,7 +14,7 @@ Write-Host "Working on the machine named: $($env:computername)" Write-Host "The user running is: $($env:UserName)" -$modules = @("PSFramework", "PSScriptAnalyzer", "Azure.Storage", "AzureAd", "PSNotification", "PSOAuthHelper", "ImportExcel") +$modules = @("PSFramework", "PSScriptAnalyzer", "Az.Storage", "AzureAd", "PSNotification", "PSOAuthHelper", "ImportExcel") foreach ($item in $modules) { $module = Get-Module -Name $item -ErrorAction SilentlyContinue diff --git a/d365fo.tools/d365fo.tools.psd1 b/d365fo.tools/d365fo.tools.psd1 index ae2ee6f3..1b10d47a 100644 --- a/d365fo.tools/d365fo.tools.psd1 +++ b/d365fo.tools/d365fo.tools.psd1 @@ -3,7 +3,7 @@ RootModule = 'd365fo.tools.psm1' # Version number of this module. - ModuleVersion = '0.7.5' + ModuleVersion = '0.7.6' # ID used to uniquely identify this module GUID = '7c7b26d4-f764-4cb0-a692-459a0a689dbb' diff --git a/d365fo.tools/d365fo.tools.psm1 b/d365fo.tools/d365fo.tools.psm1 index b05f1edd..11e6891f 100644 --- a/d365fo.tools/d365fo.tools.psm1 +++ b/d365fo.tools/d365fo.tools.psm1 @@ -1,5 +1,5 @@ $script:ModuleRoot = $PSScriptRoot -$script:ModuleVersion = "0.7.5" +$script:ModuleVersion = "0.7.6" # Detect whether at some level dotsourcing was enforced $script:doDotSource = Get-PSFConfigValue -FullName d365fo.tools.Import.DoDotSource -Fallback $false diff --git a/d365fo.tools/functions/add-d365windowsdefenderrules.ps1 b/d365fo.tools/functions/add-d365windowsdefenderrules.ps1 index b7d5ca19..b37342ac 100644 --- a/d365fo.tools/functions/add-d365windowsdefenderrules.ps1 +++ b/d365fo.tools/functions/add-d365windowsdefenderrules.ps1 @@ -62,10 +62,22 @@ function Add-D365WindowsDefenderRules { Add-MpPreference -ExclusionProcess "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe" Add-MpPreference -ExclusionProcess "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\TestPlatform\testhost.exe" Add-MpPreference -ExclusionProcess "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe" + Add-MpPreference -ExclusionProcess "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\qtagent32_40.exe" Add-MpPreference -ExclusionProcess "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\testhost.exe" + Add-MpPreference -ExclusionProcess "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" Add-MpPreference -ExclusionProcess "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe" + Add-MpPreference -ExclusionProcess "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\qtagent32_40.exe" Add-MpPreference -ExclusionProcess "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\TestPlatform\testhost.exe" + Add-MpPreference -ExclusionProcess "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" Add-MpPreference -ExclusionProcess "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" + Add-MpPreference -ExclusionProcess "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe" + Add-MpPreference -ExclusionProcess "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\qtagent32_40.exe" + Add-MpPreference -ExclusionProcess "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\Extensions\TestPlatform\testhost.exe" + Add-MpPreference -ExclusionProcess "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" + Add-MpPreference -ExclusionProcess "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exe" + Add-MpPreference -ExclusionProcess "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\qtagent32_40.exe" + Add-MpPreference -ExclusionProcess "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\TestPlatform\testhost.exe" + Add-MpPreference -ExclusionProcess "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" Add-MpPreference -ExclusionProcess "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" Add-MpPreference -ExclusionProcess "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" Add-MpPreference -ExclusionProcess "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" @@ -73,15 +85,27 @@ function Add-D365WindowsDefenderRules { # customize path for cloud machines Add-MpPreference -ExclusionProcess "$Script:BinDir\xppcAgent.exe" Add-MpPreference -ExclusionProcess "$Script:BinDir\SyncEngine.exe" + Add-MpPreference -ExclusionProcess "$Script:BinDir\bin\LabelC.exe" + Add-MpPreference -ExclusionProcess "$Script:BinDir\bin\SyncEngine.exe" + Add-MpPreference -ExclusionProcess "$Script:BinDir\bin\xppbp.exe" + Add-MpPreference -ExclusionProcess "$Script:BinDir\bin\xppc.dll" + Add-MpPreference -ExclusionProcess "$Script:BinDir\bin\xppc.exe" + Add-MpPreference -ExclusionProcess "$Script:BinDir\bin\xppcAgent.exe" + Add-MpPreference -ExclusionProcess "$Script:BinDir\bin\xppcAgent.17.0.exe" + Add-MpPreference -ExclusionProcess "$Script:BinDir\bin\xpppfagen.exe" Add-MpPreference -ExclusionProcess "$AOSPath\Batch.exe" Add-MpPreference -ExclusionProcess "$AOSPath\xppc.exe" Add-MpPreference -ExclusionProcess "$AOSPath\LabelC.exe" # add SQLServer Add-MpPreference -ExclusionProcess "C:\Program Files\Microsoft SQL Server\130\LocalDB\Binn\sqlservr.exe" + Add-MpPreference -ExclusionProcess "C:\Program Files\Microsoft SQL Server\150\LocalDB\Binn\sqlservr.exe" Add-MpPreference -ExclusionProcess "C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\sqlservr.exe" + Add-MpPreference -ExclusionProcess "C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Binn\sqlservr.exe" # add IIS and IISExpress Add-MpPreference -ExclusionProcess "C:\Windows\System32\inetsrv\w3wp.exe" Add-MpPreference -ExclusionProcess "C:\Program Files\IIS Express\iisexpress.exe" + # add Git + Add-MpPreference -ExclusionProcess "C:\Program Files\Git\cmd\git.exe" #Compile kicks off the defender. Exclude base path to AOS helps on that. Add-MpPreference -ExclusionPath $AOSServicePath @@ -90,6 +114,7 @@ function Add-D365WindowsDefenderRules { Add-MpPreference -ExclusionPath "C:\Program Files (x86)\Microsoft Visual Studio 10.0" Add-MpPreference -ExclusionPath "C:\Program Files (x86)\Microsoft Visual Studio 14.0" Add-MpPreference -ExclusionPath "C:\Program Files (x86)\Microsoft Visual Studio" + Add-MpPreference -ExclusionPath "C:\Program Files\Microsoft Visual Studio" Add-MpPreference -ExclusionPath "C:\Windows\assembly" Add-MpPreference -ExclusionPath "C:\Windows\Microsoft.NET" Add-MpPreference -ExclusionPath "C:\Program Files (x86)\MSBuild" @@ -111,6 +136,13 @@ function Add-D365WindowsDefenderRules { Add-MpPreference -ExclusionPath "$Env:USERPROFILE\AppData\Local\Microsoft\VisualStudio" Add-MpPreference -ExclusionPath "$Env:USERPROFILE\AppData\Local\Microsoft\WebsiteCache" Add-MpPreference -ExclusionPath "$Env:USERPROFILE\AppData\Roaming\Microsoft\VisualStudio" + + # Extensions + Add-MpPreference -ExclusionExtension "md" + Add-MpPreference -ExclusionExtension "man" + Add-MpPreference -ExclusionExtension "xml" + Add-MpPreference -ExclusionExtension "xpp" + Add-MpPreference -ExclusionExtension "netmodule" } catch { Write-PSFMessage -Level Host -Message "Something went wrong while configuring Windows Defender rules." -Exception $PSItem.Exception