Skip to content

Commit e4b3342

Browse files
Update Win10OptimizeAndConfig.ps1
1 parent 944ca5e commit e4b3342

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Win10OptimizeAndConfig.ps1

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
Originally Created by: Anton Romanyuk
55
Added more capibilities: Richard Tracy
66
Filename: Win10OptimizeAndConfig.ps1
7-
Last Updated: 02/06/2019
7+
Last Updated: 02/08/2019
88
Thanks to: unixuser011,W4RH4WK
99
===========================================================================
1010
.DESCRIPTION
1111
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
1314
Utilizes MDT/SCCM TaskSequence variables:
1415
_SMSTSLogPath
1516
@@ -690,9 +691,10 @@ If($DisableScript){
690691
#$VerbosePreference = 'SilentlyContinue'
691692
$VerbosePreference = 'Continue'
692693

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
696698
}
697699
Else{
698700
$Global:LGPOForConfigs = $false
@@ -723,9 +725,12 @@ If ($InstallPSModules)
723725

724726

725727
If($InstallModulesPath.count -gt 0){
728+
$i = 1
726729
Write-LogEntry "Installing PowerShell Modules..." -Severity 1 -Outhost
727730
Foreach($module in $InstallModulesPath){
728731
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++
729734
}
730735
}
731736

0 commit comments

Comments
 (0)