Loading

Enter

Skip Feed
  1. Run custom scripts for SNOW on agents

    We would like SNOW to execute Powershell scripts on devices. Does anyone know how to prepare the scripts so that they can be processed by SNOW?

     

    Is there an example of which return value can be processed by SNOW?

    The database itself probably has to be adapted by a SNOW consultant, I would just like to prepare the script so that the consultant can start it.

    Expand Post

    1 of 15
    • Community Manager (Flexera Software)

      Hi Julian, You can use non signed PowerShell scripts with the agent but they are a run in Low integrity. As most PowerShell scripts need to be run with medium integrity you will have to get them signed by Snow as Jelle stated. You should name the script starting with scan like so "Scan-PowershellScriptname.ps1" So when you create the script you can test them with the agent to see if the results are captured. Below an example: ## ## Scan-CustomFQDN.ps1 ## ## Combines DnsHostName with Domain to create a custom FQDN, ## and yields it as a custom registry key ## ## Author: Iwan Van Den Hoek, Snow Software ## ## Version: 1.0 $ version = '1.0' $ name = 'Scan-CustomFQDN' #Enter the Script name here $ d = get-date $ ComputerSystem = Get-WmiObject win32_computersystem $ FQDN = $ ComputerSystem .DnsHostName + "." + $ ComputerSystem .Domain # if the value was populated, send it as part of the inventory scanning # the HKLM\Snow\CustomFQDN is just a reference in the inventory data it is not created on the actual computer. if ($ FQDN ) { Write-Host - ForegroundColor Green "Yielding FQDN: $ FQDN " Yield - RegistryKey - key "Example key" } ## Finally, report the version of the script Yield - RegistryKey - key "Example key" Write-Host - ForegroundColor Green "Script finished successfully!" I hope this helps. Kind regards, Iwan
      Expand Post

End of Feed
End of Feed
1 Chatter Feed Items
ALL CONVERSATIONS
UNSOLVED
ARTICLES
1 Post

Related Topics

    Loading
    Enter | Flexera