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

There may be a regular way to do this in C1 without a script, but how can I pull a list of all of the software installed for a customer (ie so I can know what I need to remove that is not compliant with policy using the script helpfully created by my previous request).

Yes, we are baking it to the product as well but for now, you can use linked procedure to get it.

https://forum.mspconsortium.com/forum/script-library/4238-new-itsm-script-to-get-system-software-inventory

That’s great! Thanks, where do the results show up? Will I have to check each workstation’s individual Procedure log in ITSM or does it email me the results?

Hello @indieserve ,

The results will be visible in the “Procedure Logs” section for each device.

Ok thanks, that’s kind of what I thought. For that type of a script it’s not the greatest, but perhaps there is a way to modify it to output the inventory to a share or something, either way that’s fine just wanted to make sure I was in the right spot.

Maybe a Python script to allow those of us who don’t speak Python to run scripts from other formats? CMD/VBS/PS1?

Hello @PromptCare ,

You can use Powershell and CMD commands inside Python. Could you please let us know specifically what you need ? We do have a team who can create Python scripts for you on demand if you let us know exactly what the script should do for you. You simply have to request it (example: I want a script that would uninstall adobe reader from a device)
If we misunderstood the request, please let us know.

Among other things, I’ve got a lengthy Bat file (from one of the earlier scripts to this forum) that I would like to run periodically on systems. I just think it would be helpful to have a general template so that I can plug in those other formats into the Python script.

@PromptCare

Hello,

Please provide additional details about how the template should look and if possible some examples from your bat file (at least what it should do), we could sue it as reference when creating the template.

Knowing nothing about Python, I’m just going to make it up but something like:

Python code Python code Python code Python code
Python code Python code Python code Python code

----insert BAT/VBS/PS1 here----
@echo Put your own script here
----end of BAT/VBS/PS1-------

Python code Python code Python code Python code Python code
Python code Python code Python code Python code

Hello @PromptCare ,

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

Help with scripts still actual?

Hello @Sergey ,

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

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.

Hello @indieserve ,

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

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 ?

@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?

@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.


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.


#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


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


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

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.

Where do I can find info for developers? Object model, methods, etc…