Intune Initial Scripts Backup
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# Remediation
|
||||
|
||||
# path to the directory that TNS_ADMIN should point towards
|
||||
# Make sure its the same in both the remediation and discovery scripts
|
||||
$value = "\\ccx.carecentrix.com\public\oracle"
|
||||
|
||||
try {
|
||||
|
||||
# create the TNS_ADMIN directory if it doesn't exist
|
||||
if ( (Test-Path -Path $value) -eq $false ) {
|
||||
New-Item -Path $value -ItemType Directory
|
||||
}
|
||||
|
||||
# set the variables
|
||||
[System.Environment]::SetEnvironmentVariable('TNS_ADMIN','\\ccx.carecentrix.com\public\oracle','Machine')
|
||||
|
||||
Write-Host "TNS_ADMIN Machine variables Changed"
|
||||
exit 0
|
||||
}
|
||||
catch {
|
||||
$errMsg = $_.Exception.Message
|
||||
Write-Host $errMsg
|
||||
exit 1
|
||||
}
|
||||
Reference in New Issue
Block a user