File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 1
1
$LogFile = (Get-ItemProperty - Path " HKLM:\Software\Microsoft\SMS\Client\Configuration\Client Properties" - Name " Local SMS Path" ).' Local SMS Path' + " Logs\CM_JavaUsageLogging.log"
2
2
$LoggingEnable = $True
3
3
$UTLogFileName = " .java_usage_cm"
4
+ $OverwriteUT = $false
4
5
5
6
# #########################################################################################################
6
7
@@ -130,7 +131,7 @@ ForEach ($JRE in $JREs) {
130
131
$JREPath = test-path " $ ( $JRE.JavaHome ) \lib\management"
131
132
if ($JREPath ) {
132
133
$UTProps = test-path " $ ( $JRE.JavaHome ) \lib\management\usagetracker.properties"
133
- if (-Not $UTProps ) {
134
+ if (-Not $UTProps -or $OverwriteUT ) {
134
135
IF ($LoggingEnable -eq $true ) {Log- ScriptEvent - Value " Creating $ ( $JRE.JavaHome ) \lib\management\usagetracker.properties" - Severity 1 }
135
136
Create- UsageTrackingProps - UTPath " $ ( $JRE.JavaHome ) \lib\management\usagetracker.properties"
136
137
} else {
You can’t perform that action at this time.
0 commit comments