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

Hello @Sergey

The scripts are python, so you can simply use any python guide in this regard. Here is one example: https://www.python.org/about/help/

Hi @siyam

I try to use this powershell code on my local machine and it works.I want to set dynamic ip adress for network adapters.
But when run procedure over ITSM with this code not working.But it show as succeded. I am trying to run powersheell script file over shared folder for all my network or may be over internet

I have modified your procedure .Now you don’t need to have powershell file in your network,instead power shell script content should be passed to procedure(Refer input variable).
Procedure create powershell file internally, process it and export the results to ITSM.


import time;
import os;
import re;
import ctypes
file='C:\\automateip.ps1';
input="""
$IPType = "IPv4"
$adapter = Get-NetAdapter | ? {$_.Status -eq "up"}
$interface = $adapter | Get-NetIPInterface -AddressFamily $IPType

If ($interface.Dhcp -eq "Disabled") {
    # Remove existing gateway
    If (($interface | Get-NetIPConfiguration).Ipv4DefaultGateway) {
        $interface | Remove-NetRoute -Confirm:$false
    }

    # Enable DHCP
    $interface | Set-NetIPInterface -DHCP Enabled

    # Configure the  DNS Servers automatically
    $interface | Set-DnsClientServerAddress -ResetServerAddresses
}"""

fobj=open(file,"w");
fobj.write(input);
fobj.close();

class disable_file_system_redirection:
    _disable = ctypes.windll.kernel32.Wow64DisableWow64FsRedirection
    _revert = ctypes.windll.kernel32.Wow64RevertWow64FsRedirection
    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)
   

with disable_file_system_redirection():
    out=os.popen(r'powershell.exe -executionpolicy bypass -file C:\automateip.ps1').read();
    print(out);

os.remove(file);

Please let me know your feedback if you find any problem .

automate_ip_assign.txt (1.28 KB)

Hi @siyam

Regarding ,

1.Yes i am reffering to the Windows firewall
ı succeeded with tis code but still asking whether he/she wants to re-enable it or not.

You may disable Windows Firewall permanently. But in order to quiet re-enable notifications you have to disable Windows Notification Centre which handles security notifications.

Important note:
If you disable Notification center you will not receive notifications for the following windows components viz,

  1. Network Firewall
  2. Virus protection
  3. User Access control
  4. Spyware and unwanted software protection
  5. Internet security settings

You can disable notification center by running below 2 commands in cmd.exe ( Run as administrator).

1.reg add “HKCU\Software\Microsoft\Windows\CurrentVersion\PushNotifications” /v “ToastEnabled” /t REG_DWORD /d 0 /f

2.reg add “HKCU\Software\Policies\Microsoft\Windows\Explorer” /v “DisableNotificationCenter” /t REG_DWORD /d 1 /f

We are working on procedure to disable firewall and all security notifications.
We will update you once completed.

Is it possible to resize/delete/create partitions with ITSM scripts?

Hello @Sergey

I will forward your inquiry/request for a script that could resize/delete/create partitions. We will contact you as soon as we have any information on this.

hi @mkannan

Thank you :slight_smile: it works like a charm

Hi @siyam

Thanks for your interest in procedures. Please post your request if you have any other scripts need.

Need script for clean folders:

  1. Remove all files from folders with name “temp” and “Temporary internet files” at all users profiles (Documents&Settings\User…).
  2. Clean up Windows Temp folder
  3. Cleanup installed browsers caches (coockies, history of viewing and download history must remain).

Is it possible to do it automatically with Acronis backup starts?

Hello @Sergey ,

I have forwarded your script requests to the appropriate staff for further analysis.

Regarding the last request, we can’t interfere with the Acronis Backup Agent’s code as it is neither open source or Comodo developed. However, you should be able to achieve the expected outcome by simply scheduling the script/procedure to run just before you schedule the back-up.

Hi @Sergey

Regarding your request ,

Is it possible to resize/delete/create partitions with ITSM scripts?

Please refer below link for manage partitions procedure,

Hi Team,

Could you create a python script to send email to service desk when ping response time to asp30.ecwcloud.com is greater than 50ms within a 1-2mins window?

Kind Regards.

Hi Ferdinand

Could you share your mail client details ?

Hi mkannan

Please check your private message for details. Thanks!

I need a script to uninstall sophos and disable the tamper protection (with password), is this possible?

Hi @12297243

It is possible but i request you to share windows commands API for task uninstall sophos , disable temper protection respectively. They are supposed to be provided by sophos .

Thank you!

the main reason we switched to comodo is the lack of communication from sophos vendor. We were given an install file and a key but no login to sophos’ website :frowning:

Hi @12297243

I will prepare script and update you when completed.

Thanks

maybe this can help you

https://4sysops.com/archives/uninstall-tamper-protected-sophos-antivirus-with-powershell/

You don’t need to stick with them :slight_smile: We are here with far better security and support…

We have comodo on two PCs currently and it has run fine. The reason I requested a script to uninstall is so I can mass roll out comodo :slight_smile: