Scripts
SCRIPT: Add Quick access
Create a New PowerShell Fill “.ps1”
and then run a gpo with login Script to the FILE
$o = new-object -com shell.application
$o.Namespace(‘\\SMB‘).Self.InvokeVerb(“pintohome”)
Script: install Avast
in order to install Avast from GPO or script
please create account for avast for businesses and download avast install – Online
and save the file in smb
then create a bat file
IF EXIST “C:\Program Files\AVAST Software\Avast\AvastUI.exe” (Echo avast is install) ELSE (“\\SMB\avast_business_antivirus_setup_online.exe” /VERYSILENT)
Script: install Office
if exist “C:\Program Files\Microsoft Office\Office16” goto :eof ELSE
\\Smbfolder\\setup.exe /adminfile \\Smb-Folder\Office.MSP
to create the MSP file Please run cmd
go to office install folder and run
setup.exe /admin
then you will see options for the MSP file
Provide the data that you wish to enter as KEY and more
and then save the file in the SMB folder
for more info
Automate the Install of Microsoft Office 2016 with an MSP File
Script: install TighVnc
echo Installing TightVNC
@echo Check if Program Is Installed
if exist “C:\Program Files (x86)\TightVNC” goto :eof ELSE
if exist “C:\Program Files\TightVNC” goto :eof ELSE
@echo Installing
msiexec /i “\\your-smb\tightvnc-2.8.8-gpl-setup-64bit.msi” /quiet /norestart ADDLOCAL=”Server” VIEWER_ASSOCIATE_VNC_EXTENSION=1 SERVER_REGISTER_AS_SERVICE=1 SERVER_ADD_FIREWALL_EXCEPTION=1 VIEWER_ADD_FIREWALL_EXCEPTION=1 SERVER_ALLOW_SAS=1 SET_USEVNCAUTHENTICATION=1 VALUE_OF_USEVNCAUTHENTICATION=1 SET_PASSWORD=1 VALUE_OF_PASSWORD=”272612″ SET_USECONTROLAUTHENTICATION=1 VALUE_OF_USECONTROLAUTHENTICATION=0 SET_CONTROLPASSWORD=1 VALUE_OF_CONTROLPASSWORD=“Your-Password” SET_VIEWONLYPASSWORD=1 VALUE_OF_VIEWONLYPASSWORD=“Your-Password”
net stop “TightVNC Server”
net start “TightVNC Server”
Script: clean iss logs
sLogFolder = “c:\inetpub\logs\LogFiles”
iMaxAge = 30 ‘in days
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
set colFolder = objFSO.GetFolder(sLogFolder)
For Each colSubfolder in colFolder.SubFolders
Set objFolder = objFSO.GetFolder(colSubfolder.Path)
Set colFiles = objFolder.Files
For Each objFile in colFiles
iFileAge = now-objFile.DateCreated
if iFileAge > (iMaxAge+1) then
objFSO.deletefile objFile, True
end if
Next
Next