System Admin Helps
Thursday, June 21, 2018
Thursday, June 14, 2018
Thursday, September 28, 2017
Disable EULA on Adobe DC for All Users
When deploying Microsoft Terminal Services Remote Desktop or RD Apps you may want to disable the Adobe DC EULA prompt for all users by default.
I was unable to find the exact registry key online to make this fix so I found the fix where you run the installation with the EULA_ACCEPT=YES flag and found where the registry change was made.
I then added these reg keys to the RDP App servers and we no longer get the EULA Prompts.
The reg key needed is:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Adobe\Acrobat Reader\DC\AdobeViewer]
"EULA"=dword:00000001
A few other keys we needed in the past that were hindering users were:
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\Acrobat Reader\DC\FeatureLockDown]
"bProtectedMode"=dword:00000000
"bUpdater"=dword:00000000
"bUsageMeasurement"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\Acrobat Reader\DC\FeatureLockDown\cIPM]
"bDontShowMsgWhenViewingDoc"=dword:00000000
"bShowMsgAtLaunch"=dword:00000000
I was unable to find the exact registry key online to make this fix so I found the fix where you run the installation with the EULA_ACCEPT=YES flag and found where the registry change was made.
I then added these reg keys to the RDP App servers and we no longer get the EULA Prompts.
The reg key needed is:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Adobe\Acrobat Reader\DC\AdobeViewer]
"EULA"=dword:00000001
A few other keys we needed in the past that were hindering users were:
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\Acrobat Reader\DC\FeatureLockDown]
"bProtectedMode"=dword:00000000
"bUpdater"=dword:00000000
"bUsageMeasurement"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\Acrobat Reader\DC\FeatureLockDown\cIPM]
"bDontShowMsgWhenViewingDoc"=dword:00000000
"bShowMsgAtLaunch"=dword:00000000
Monday, September 18, 2017
Push GPUPDATE to List of Computers on Domain
@ECHO OFF
:: This Script must be run with Domain Admin rights
:: You also must have PSEXEC on your PC (See How To doc)
PING 1.1.1.1 -n 1 -w 500 >NUL
echo.
echo.
echo --------------------------------------------
echo --------------------------------------------
echo ---- WELCOME TO THE SME MULTIPLE DEVICE ----
echo ---- AUTOMATED GPUPDATE SCRIPT ----
echo --------------------------------------------
echo --------------------------------------------
echo.
echo.
PING 1.1.1.1 -n 1 -w 1500 >NUL
echo.
REG ADD "HKEY_CURRENT_USER\Software\Sysinternals\PsExec" /v "EulaAccepted" /t "REG_DWORD" /d "1" /f
For /f "tokens=*" %%a in (gpupdate_computers.txt) Do psexec \\%%a -i gpupdate
:: To grab the latest list of all Devices in the domain use the following query in AD Powershell:
:: Get-ADComputer –filter 'Name -like "*"' -Searchbase "dc=sme-inc, dc=net" | Select-Object -ExpandProperty Name | Out-File -Encoding ascii gpupdate_computers.txt
PAUSE
:: This Script must be run with Domain Admin rights
:: You also must have PSEXEC on your PC (See How To doc)
PING 1.1.1.1 -n 1 -w 500 >NUL
echo.
echo.
echo --------------------------------------------
echo --------------------------------------------
echo ---- WELCOME TO THE SME MULTIPLE DEVICE ----
echo ---- AUTOMATED GPUPDATE SCRIPT ----
echo --------------------------------------------
echo --------------------------------------------
echo.
echo.
PING 1.1.1.1 -n 1 -w 1500 >NUL
echo.
REG ADD "HKEY_CURRENT_USER\Software\Sysinternals\PsExec" /v "EulaAccepted" /t "REG_DWORD" /d "1" /f
For /f "tokens=*" %%a in (gpupdate_computers.txt) Do psexec \\%%a -i gpupdate
:: To grab the latest list of all Devices in the domain use the following query in AD Powershell:
:: Get-ADComputer –filter 'Name -like "*"' -Searchbase "dc=sme-inc, dc=net" | Select-Object -ExpandProperty Name | Out-File -Encoding ascii gpupdate_computers.txt
PAUSE
Force Installation of all Software Updates available
A Power-Shell script to install all software updates available in Microsoft Software Center
Put it and a file named clients.txt containing a list of all PC's to update in the same directory and then run the PS script.
More information here:
https://gallery.technet.microsoft.com/SCCM-Configmgr-Powershell-ebbb2c0e
Put it and a file named clients.txt containing a list of all PC's to update in the same directory and then run the PS script.
More information here:
https://gallery.technet.microsoft.com/SCCM-Configmgr-Powershell-ebbb2c0e
<#
AUTHOR : Eswar Koneti
DATE : 14-Nov-2016
COMMENT : This script check and install the software updates available in
software center on clients remotly with nice logging info
VERSION : 1.0
#>
# Determine script location
$ScriptDir = Split-Path $script:MyInvocation.MyCommand.Path
$log = "$ScriptDir\InstallUpdates.log"
$date = Get-Date -Format "dd-MM-yyyy hh:mm:ss"
# Get list of clients from notepad
"--------------------- Script executed on $date (DD-MM-YYYY hh:mm:ss) ---------------------" + "`r`n" | Out-File $log -append
ForEach ($system in Get-Content $ScriptDir"\clients.txt")
{
$wmicheck=$null
$wmicheck =Get-WmiObject -ComputerName $system -namespace root\cimv2 -Class Win32_BIOS -ErrorAction SilentlyContinue
if ($wmicheck)
{
# Get list of all instances of CCM_SoftwareUpdate from root\CCM\ClientSDK for missing updates https://msdn.microsoft.com/en-us/library/jj155450.aspx?f=255&MSPPError=-2147217396
$TargetedUpdates= Get-WmiObject -ComputerName $system -Namespace root\CCM\ClientSDK -Class CCM_SoftwareUpdate -Filter ComplianceState=0
$approvedUpdates= ($TargetedUpdates |Measure-Object).count
$pendingpatches=($TargetedUpdates |Where-Object {$TargetedUpdates.EvaluationState -ne 8} |Measure-Object).count
$rebootpending=($TargetedUpdates |Where-Object {$TargetedUpdates.EvaluationState -eq 8} |Measure-Object).count
if ($pendingpatches -gt 0)
{
try {
$MissingUpdatesReformatted = @($TargetedUpdates | ForEach-Object {if($_.ComplianceState -eq 0){[WMI]$_.__PATH}})
# The following is the invoke of the CCM_SoftwareUpdatesManager.InstallUpdates with our found updates
$InstallReturn = Invoke-WmiMethod -ComputerName $system -Class CCM_SoftwareUpdatesManager -Name InstallUpdates -ArgumentList (,$MissingUpdatesReformatted) -Namespace root\ccm\clientsdk
"$system,Targeted Patches :$approvedUpdates,Pending patches:$pendingpatches,Reboot Pending patches :$rebootpending,initiated $pendingpatches patches for install" | Out-File $log -append
}
catch {"$System,pending patches - $pendingpatches but unable to install them ,please check Further" | Out-File $log -append }
}
else {"$system,Targeted Patches :$approvedUpdates,Pending patches:$pendingpatches,Reboot Pending patches :$rebootpending,Compliant" | Out-File $log -append }
}
else {"$system,Unable to connect to remote system ,please check further" | Out-File $log -append }
}
Keywords: SCCM Software Update Microsoft Clients Force Stuck
AUTHOR : Eswar Koneti
DATE : 14-Nov-2016
COMMENT : This script check and install the software updates available in
software center on clients remotly with nice logging info
VERSION : 1.0
#>
# Determine script location
$ScriptDir = Split-Path $script:MyInvocation.MyCommand.Path
$log = "$ScriptDir\InstallUpdates.log"
$date = Get-Date -Format "dd-MM-yyyy hh:mm:ss"
# Get list of clients from notepad
"--------------------- Script executed on $date (DD-MM-YYYY hh:mm:ss) ---------------------" + "`r`n" | Out-File $log -append
ForEach ($system in Get-Content $ScriptDir"\clients.txt")
{
$wmicheck=$null
$wmicheck =Get-WmiObject -ComputerName $system -namespace root\cimv2 -Class Win32_BIOS -ErrorAction SilentlyContinue
if ($wmicheck)
{
# Get list of all instances of CCM_SoftwareUpdate from root\CCM\ClientSDK for missing updates https://msdn.microsoft.com/en-us/library/jj155450.aspx?f=255&MSPPError=-2147217396
$TargetedUpdates= Get-WmiObject -ComputerName $system -Namespace root\CCM\ClientSDK -Class CCM_SoftwareUpdate -Filter ComplianceState=0
$approvedUpdates= ($TargetedUpdates |Measure-Object).count
$pendingpatches=($TargetedUpdates |Where-Object {$TargetedUpdates.EvaluationState -ne 8} |Measure-Object).count
$rebootpending=($TargetedUpdates |Where-Object {$TargetedUpdates.EvaluationState -eq 8} |Measure-Object).count
if ($pendingpatches -gt 0)
{
try {
$MissingUpdatesReformatted = @($TargetedUpdates | ForEach-Object {if($_.ComplianceState -eq 0){[WMI]$_.__PATH}})
# The following is the invoke of the CCM_SoftwareUpdatesManager.InstallUpdates with our found updates
$InstallReturn = Invoke-WmiMethod -ComputerName $system -Class CCM_SoftwareUpdatesManager -Name InstallUpdates -ArgumentList (,$MissingUpdatesReformatted) -Namespace root\ccm\clientsdk
"$system,Targeted Patches :$approvedUpdates,Pending patches:$pendingpatches,Reboot Pending patches :$rebootpending,initiated $pendingpatches patches for install" | Out-File $log -append
}
catch {"$System,pending patches - $pendingpatches but unable to install them ,please check Further" | Out-File $log -append }
}
else {"$system,Targeted Patches :$approvedUpdates,Pending patches:$pendingpatches,Reboot Pending patches :$rebootpending,Compliant" | Out-File $log -append }
}
else {"$system,Unable to connect to remote system ,please check further" | Out-File $log -append }
}
Thursday, September 14, 2017
Batch Script - Scheduled Task to Multiple PC's
Use the following to push out scheduled task to a list of PC's.
(Note: you need full domain admin privileges and admin sharing must be enabled on the clients)
1. Create a Scheduled task on your PC and export it as an xml file
NOTE: You could use basic 'schtasks' commands but using export/import xml is best as it is able to add all scheduling options and also overwrites existing task without prompt
2. Create a list of PC names on the network you want to reboot and put them into a text file
3. Create a batch file from the text below and put it into the same directory as the text file of PC's
4. Change the variables in the script and run it
keywords:
microsoft task scheduler reboot multiple tasks batch file cmd automated list files scripting script
(Note: you need full domain admin privileges and admin sharing must be enabled on the clients)
1. Create a Scheduled task on your PC and export it as an xml file
NOTE: You could use basic 'schtasks' commands but using export/import xml is best as it is able to add all scheduling options and also overwrites existing task without prompt
2. Create a list of PC names on the network you want to reboot and put them into a text file
3. Create a batch file from the text below and put it into the same directory as the text file of PC's
4. Change the variables in the script and run it
@ECHO ON
::
SET sourcexmlfile=C:\Users\***\reboot.xml
SET destxmlfile=\\%%a\C$\Temp\reboot.xml
SET clientlist=reboot.txt
SET taskname=reboot
::
For /f "tokens=*" %%a in (%clientlist%) Do (
copy %sourcexmlfile% %destxmlfile%
psexec \\%%a schtasks.exe /create /tn %taskname% /RU system /xml %destxmlfile% /f
)
::
SET sourcexmlfile=C:\Users\***\reboot.xml
SET destxmlfile=\\%%a\C$\Temp\reboot.xml
SET clientlist=reboot.txt
SET taskname=reboot
::
For /f "tokens=*" %%a in (%clientlist%) Do (
copy %sourcexmlfile% %destxmlfile%
psexec \\%%a schtasks.exe /create /tn %taskname% /RU system /xml %destxmlfile% /f
)
keywords:
microsoft task scheduler reboot multiple tasks batch file cmd automated list files scripting script
Subscribe to:
Comments (Atom)
-
When deploying Microsoft Terminal Services Remote Desktop or RD Apps you may want to disable the Adobe DC EULA prompt for all users by defa...