|
4 | 4 | Originally Created by: Anton Romanyuk
|
5 | 5 | Added more capibilities: Richard Tracy
|
6 | 6 | Filename: Win10OptimizeAndConfig.ps1
|
7 |
| - Last Updated: 02/06/2019 |
| 7 | + Last Updated: 02/08/2019 |
8 | 8 | Thanks to: unixuser011,W4RH4WK
|
9 | 9 | ===========================================================================
|
10 | 10 | .DESCRIPTION
|
11 | 11 | Applies Windows 10 Optimizations and configurations. Supports VDI optmizations
|
12 |
| - Utilizes LGPO.exe to apply group policy item where neceassary. |
| 12 | + Utilizes LGPO.exe to apply group policy item where neceassary. |
| 13 | + Applies DISA stigs for Windows 10 |
13 | 14 | Utilizes MDT/SCCM TaskSequence variables:
|
14 | 15 | _SMSTSLogPath
|
15 | 16 |
|
@@ -690,9 +691,10 @@ If($DisableScript){
|
690 | 691 | #$VerbosePreference = 'SilentlyContinue'
|
691 | 692 | $VerbosePreference = 'Continue'
|
692 | 693 |
|
693 |
| -$FindLGPO = (Get-ChildItem $Global:LGPOPath -Filter LGPO.exe).FullName |
694 |
| -If(Test-Path $FindLGPO){ |
695 |
| - $Global:LGPOPath = $FindLGPO |
| 694 | +#check if LGPO file exists in Tools directory or Specified LGPOPath |
| 695 | +$FindLGPO = Get-ChildItem $Global:LGPOPath -Filter LGPO.exe -ErrorAction SilentlyContinue |
| 696 | +If($FindLGPO){ |
| 697 | + $Global:LGPOPath = $FindLGPO.FullName |
696 | 698 | }
|
697 | 699 | Else{
|
698 | 700 | $Global:LGPOForConfigs = $false
|
@@ -723,9 +725,12 @@ If ($InstallPSModules)
|
723 | 725 |
|
724 | 726 |
|
725 | 727 | If($InstallModulesPath.count -gt 0){
|
| 728 | + $i = 1 |
726 | 729 | Write-LogEntry "Installing PowerShell Modules..." -Severity 1 -Outhost
|
727 | 730 | Foreach($module in $InstallModulesPath){
|
728 | 731 | Import-Module -name $module.FullName -Global -NoClobber -Force | Out-Null
|
| 732 | + Write-Progress -Activity "Installing PowerShell Module..." -Status $module.FullName -PercentComplete ($i / $InstallModulesPath.count * 100) |
| 733 | + $i++ |
729 | 734 | }
|
730 | 735 | }
|
731 | 736 |
|
|
0 commit comments