I need to increase the connection timeout value on a large number of Linux Assets and have been provided with the below powershell.
Connect-Safeguard -Appliance ip_address_safeguard -Insecure -Gui -Verbose
#Array of assets to update
$AssetsToUpdate = "asset1","asset2"
ForEach ($i in $AssetsToUpdate)
{
$asset = Get-SafeguardAsset -AssetToGet $i $asset.ConnectionProperties.CommandTimeout = 120 $id = $asset.Id invoke-safeguardmethod core put "Assets/$id" -Body $asset
}
This is returns the below error:
+ $asset = Get-SafeguardAsset -AssetToGet $i $asset.ConnectionPropertie ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-SafeguardAsset], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Get-SafeguardAsset