Additional Script Updates
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# Detection Script (Detect_OfficeTemplates.ps1)
|
||||
$TemplatePath = "C:\Program Files\Microsoft Office\root\Templates\1033\CompanyLetter.dotx"
|
||||
if (Test-Path -Path $TemplatePath) {
|
||||
Write-Host "Template file exists: $TemplatePath"
|
||||
exit 0
|
||||
} else {
|
||||
Write-Host "Template file not found: $TemplatePath"
|
||||
exit 1
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
# Remediation Script (Remediate_OfficeTemplates.ps1)
|
||||
$SourcePath = "\\server\share\Templates\CompanyLetter.dotx"
|
||||
$DestinationPath = "C:\Program Files\Microsoft Office\root\Templates\1033\CompanyLetter.dotx"
|
||||
|
||||
if (Test-Path -Path $SourcePath) {
|
||||
Copy-Item -Path $SourcePath -Destination $DestinationPath -Force
|
||||
Write-Host "Template file copied to: $DestinationPath"
|
||||
} else {
|
||||
Write-Host "Template file not found in the central repository."
|
||||
}
|
||||
Reference in New Issue
Block a user