Announcement

Collapse
No announcement yet.

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

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Hello PromptCare ,

    Thank you for your feedback, we have contacted you by email regarding this and will keep you posted on there.

    Comment


    • #32
      Help with scripts still actual?

      Comment


      • #33
        Hello Sergey ,

        Definitely, if you need any type of Python script, please let us know and we will provide it to you.

        Comment


        • #34
          I have a bunch of PCs at a site, and they aren't on a domain, just a NAS with it's own login/password - can it be scripted so that I can map them all network drives through Procedures (I supply a login/password in the script for the share?). I did notice a script for mapping network drives but it looks like it's only for PCs on a domain.

          Comment


          • #35
            Hello indieserve ,

            We have contacted you by email regarding this request and will keep you up to date there.

            Comment


            • #36
              Hi
              i need something that will disable firewall and will not prompt for enabling it again and a code for to get ip adress from dhcp automatically.Some user in my network assigning their ip manually.

              is it possible ?

              Comment


              • #37
                siyam

                1. Are you referring to the Windows firewall or our security product's component?
                2. Please provide additional details as to what it should fetch and from where. Should the script obtain the IP addresses from the server and assign them to the endpoints without allowing the end user to modify it? Should it retrieve the previously assigned IP address for a device and modify it when the procedure is run?

                Comment


                • #38
                  Wyatt
                  Hello

                  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.
                  Code:
                  import subprocess;
                  process=subprocess.Popen(["powershell","netsh advfirewall set allprofiles state off"],stdout=subprocess.PIPE);
                  result=process.communicate()[0]
                  print (result)
                  2.The script will optain ip from dhcp without allowing them to modify it.
                  It shouldnt retrieve the previously assigned IP address for device and modify it.

                  I try to use this powershell code on my local machine and it works.I want to set dynamic ip adress for network adapters.
                  Code:
                  #saved as Set-IPDynamic.ps1 on a shared folder ( \\192.168.1.6\Set-IPDynamic.ps1 or Y:\\Set-IPDynamic.ps1
                  $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
                  }
                  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

                  Code:
                  import os;
                  setpolicy=os.popen('powershell "Set-ExecutionPolicy -ExecutionPolicy Unrestricted" ').read();
                  print(setpolicy);
                  run=os.popen('powershell "Y:\\Set-IPDynamic.ps1" ').read();
                  print(run)
                  Code:
                  import os;
                  setpolicy=os.popen('powershell "Set-ExecutionPolicy -ExecutionPolicy Unrestricted" ').read();
                  print(setpolicy);
                  run=os.popen('powershell "\\192.168.1.6\Set-IPDynamic.ps1" ').read();
                  print(run)
                  Thank you

                  Comment


                  • #39
                    Hello siyam

                    Thank you for the Details. We will escalate this as a Feature Request and we will advise further as new information becomes available.

                    Comment


                    • #40
                      Where do I can find info for developers? Object model, methods, etc...

                      Comment


                      • #41
                        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/

                        Comment


                        • #42
                          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.


                          Code:
                          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 .






                          Attached Files

                          Comment


                          • #43
                            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\Pu shNotifications" /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.

                            Comment


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

                              Comment


                              • #45
                                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.

                                Comment

                                Working...
                                X