Script Requests - Itarian team will write the scripts for you :) for FREE

Hi PremJK, Thanks for the reply. For this script to work, do I copy the program over to the portal? regards Seng San

Hi @asdadmin,

Please check this wiki prepared by our back end team to add applications in endpoint
https://wiki.itarian.com/frontend/web/topic/how-to-push-apps-to-windows-devices-from-the-application-store-in-endpoint-manager

Kind Regards,
PremJK

I have installed 7-zip successfully using the application store. 7-zip is one of the support applications on ITARIAN

Can you create a script for Storage Sense? this is how it will look in PowerShell. Thanks

Enable Storage Sense

Ensure the StorageSense key exists

$key = “HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\S torageSense”
If (!(Test-Path “$key”)) {
New-Item -Path “$key” | Out-Null
}
If (!(Test-Path “$key\Parameters”)) {
New-Item -Path “$key\Parameters” | Out-Null
}
If (!(Test-Path “$key\Parameters\StoragePolicy”)) {
New-Item -Path “$key\Parameters\StoragePolicy” | Out-Null
}

Set Storage Sense settings

Enable Storage Sense

Set-ItemProperty -Path “$key\Parameters\StoragePolicy” -Name “01” -Type DWord -Value 1

Set ‘Run Storage Sense’ to Every Week

Set-ItemProperty -Path “$key\Parameters\StoragePolicy” -Name “2048” -Type DWord -Value 7

Enable ‘Delete temporary files that my apps aren’t using’

Set-ItemProperty -Path “$key\Parameters\StoragePolicy” -Name “04” -Type DWord -Value 1

Set ‘Delete files in my recycle bin if they have been there for over’ to 14 days

Set-ItemProperty -Path “$key\Parameters\StoragePolicy” -Name “08” -Type DWord -Value 1
Set-ItemProperty -Path “$key\Parameters\StoragePolicy” -Name “256” -Type DWord -Value 14

Set ‘Delete files in my Downloads folder if they have been there for over’ to 60 days

Set-ItemProperty -Path “$key\Parameters\StoragePolicy” -Name “32” -Type DWord -Value 1
Set-ItemProperty -Path “$key\Parameters\StoragePolicy” -Name “512” -Type DWord -Value 60

Set value that Storage Sense has already notified the user

Set-ItemProperty -Path “$key\Parameters\StoragePolicy” -Name “StoragePoliciesNotified” -Type DWord -Value 1

Hi @mayberts,

Thanks for your script request. We have asked our script developers to analyze and provide the script.

Kind Regards,
PremJK

Historically we have used Cylance antivirus, and it still exists on our machines. It is protected with a password, and no one has it. I have found a workaround, but it is very manual. Would it be possible for this to be made into a script?

We need SetACL to change permissions of the Cyalnce have more info here https://helgeklein.com/setacl/

XCOPY \SERVERNAME\Deploy\SetACL.exe “C:\Windows\System32” /I

SetACL.exe -on “HKEY_LOCAL_MACHINE\SOFTWARE\Cylance\Desktop” -ot reg -actn setowner -ownr “n:administrators”

SetACL.exe -on “HKEY_LOCAL_MACHINE\SOFTWARE\Cylance\Desktop” -ot reg -actn ace -ace “n:administrators;p:full”

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Cylance\Desktop /v SelfProtectionLevel /t REG_DWORD /d 1

reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Cylance\Desktop /v LastStateRestorePoint

Once the above has been done, I can remove Cylance using the below procedure.

guid=’{2E64FC5C-9286-4A31-916B-0D8AE4B22954}’

import subprocess
import ctypes

class disable_file_system_redirection:
_disable = ctypes.windll.kernel32.Wow64DisableWow64FsRedirect ion
_revert = ctypes.windll.kernel32.Wow64RevertWow64FsRedirecti on
def enter(self):
self.old_value = ctypes.c_long()
self.success = self._disable(ctypes.byref(self.old_value))
def exit(self, type, value, traceback):
if self.success:
self._revert(self.old_value)

Thanks

Hi @mayberts,

Thanks for your script request. We have asked our script developers to check and provide you with update.

Kind Regards,
PremJK

Hi @mayberts,

Please run this script in JSON prepared by our script developers to suffice your needs,

Note: Run as System User or Logged in User.

Kind Regards,
PremJK

20210616-Remove_Cylance_antivirus.json (2.47 KB)

@PremJkumar I have imported to JSON, but it fails to do anything. I can run the procedure and it shows as started, but there is no additional info. I can see it doesn’t do the first step which is Xcopy

Hi,
Is it possible to run the procedure with the desired account on the client? Currently the only option is SYSTEM and Logged in user. We cannot use logged in user as it does not have admin rights and SYSTEM we are not able to use as it does not show any popup. I am deploying the applications to the client using chocolatey and have created a GUI app based on powershell. This GUI app is called before the application is installed. The purpose of this app is to allow user to postpone the installation if they want to do it. Ideally this is supposed to be given by Itarian itself but that is a gap in this product, so i try to fill that gap but i am now stuck in this SYSTEM and logged in user option.

Hi @mdyunusraza,

We have shared your script request with our script developers and we would like to have a remote session to analyze your request.
Please let us know if it is okay for you. We will create a support ticket to gather the required details.

Kind Regards,
PremJK

Ok. I am in GMT +8 time zone…so you can send invite and we can discuss

Is there a script which will monitor when the device is enrolled to a specific group (most likely it will be a default group) and then accordingly move the device to the right group. We will move the device to the desired group based on the first 3 characters of the hostname.

I could not find any option within the console, so i am assuming that we will have to create a procedure or monitor and then run it accordingly.

Hi @mayberts,

Our script developers would like to have a remote session to test the script in your environment. We would create a support ticket to communicate further details.

Kind Regards,
PremJK

Hello… i have been asked to create the following and would appreciate it very much if you guys could create this process…
based on datto…

So what i need is:

" script working in AutoTask which installs Itarian so it can be executed against all devices and clients"
clarification: Requesting a script be made in AutoTask to install Itarian agent. Serving the purpose of transferring all devices from Autotask

Two points which matter:
1- I can have a URL generated for each client which will have the executable to run
2- I will also need it for Continuum eventually

please advise as i am not finding much… thank you…

A hosts file modification is a simple tweak that is used to “trick” your computer into resolving to a specific IP. This is especially useful when developing your site on server when your nameservers are not pointed. This is necessary when you are working with domain-name-dependent software.

Hi @Walsh1,

If you are in need of the script, please try this JSON file and let us know your feedback

Kind Regards,
PremJK

20210303-windows_hosts.json (1.21 KB)

I am looking for a script to do the following.

Create Folder
Download A file or Multiple Files into this folder (i may have 1-5 files)
Install 2 Different font files (These will likely be in the previously downloaded files in the folder created, for ease of use, or can be seperate)

Also in addition to fully automate this process, Add the Folder Created to the Trusted Locations in excel.

Hi @Cronus

Hmmm… Have you considered packing those files into a single zip file and then using the following script?

Download zip file from Google Drive, unzip it, run CMD script
https://forum.itarian.com/forum/script-library/59331-download-zip-file-from-google-drive-unzip-it-run-cmd-script

We are using this one for distributing fonts to the endpoints and it’s working pretty fine for us: we just pack the fonts along with a cmd script that just copies the fonts to the C:\Windows\Fonts folder and then adds the fonts to the registry at both “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Fonts” and “HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft \Windows NT\CurrentVersion\Fonts”. As this adds the fonts to the system for all the users on the computer, you would not need to add the new fonts folder to the Trusted Folder.

Worth a try, I think.

Hope this will help. Have a nice day!
– Javier Llorente
Endpoint Security - Devoteam

This might work and I"ll try it out. Do you have the exact batch script to install a font? That would save me some time researching that.

As far as Trusted Folder, thats still needed as im putting an excel file somewhere thats not already trusted. But I think I’ll just install that to a trusted location and then make a shortcut for it.