Retrieve details of a specific worklet by its UUID. This endpoint provides comprehensive information about the worklet, including its name, description, OS compatibility, and other metadata.
Successful Operation
Invalid Request
Access token is missing or invalid
You do not have permission to perform this action.
Entity not found
Too many requests
Service Unavailable
Invalid Request
$apiKey = 'your_automox_api_key' $headers = @{ "Authorization" = "Bearer $apiKey" } $url = "https://console.automox.com/api/wis/search/{id}" $response = (Invoke-WebRequest -Method Get -Uri $url -Headers $headers -ContentType "application/json").Content
{- "uuid": "ab6a9bdc-95b8-5e82-a248-dafe2e40d5a7",
- "name": "Add Network Printer",
- "description": "This worklet will allow an Admin to add a network shared printer that installs at user logon.",
- "category": "System Preferences",
- "keywords": [
- "task",
- "logon",
- "scheduled",
- "printer",
- "share",
- "network"
], - "inputs": [ ],
- "language": "PowerShell",
- "status": "ACTIVE",
- "creator": "Basil Fawlty",
- "verified": true,
- "version": "1.0.0",
- "authors": [
- {
- "name": "Basil Fawlty",
- "email": "basil.fawlty@example.com"
}
], - "categories": [
- "System Preferences"
], - "bundles": [ ],
- "refs": [ ],
- "legacy_id": 4,
- "user_interaction_required": false,
- "os_family": "Windows",
- "feature_compatibility": [ ],
- "schema_version": "2.0.0",
- "device_type": [
- "WORKSTATION",
- "SERVER"
], - "license_required": false,
- "evaluation_code": "<#\n.SYNOPSIS\n Install Network Printer - Evaluation Script\n OS Support: Windows 8(Server 2012) and above\n Powershell: 3.0 and above\n Run Type: Evaluation or OnDemand\n.DESCRIPTION\n This worklet is designed to grant an Admin the ability to install a network printer on a device. A scheduled task\n will be created (Add_Printer) that runs at user logon. The task will attempt to connect to the network printer, and\n install if reachable. The scheduled task will be removed in future remediation cycles as long as the specified printer\n is found as installed.\n\n Usage:\n Three variables are utilized for this template. They represent the \\\\Server\\Share path of a network printer, and the\n friendly name represented to the user. All items should be enclosed in quotation marks.\n\n $prntSvr: This is the Name or IP Address of the print server hosting the network printer. Only supply the Name or IP\n address without the \"\\\" symbols.\n\n $shareName: This is the printers share name. Only supply the printers share name without the \"\\\" symbols. This variable\n will also be added to the task for easier identification when running multiple worklets. Avoid using share names that\n contain spaces.\n\n $fName: This is the friendly name of the printer. This name will typically reference model numbers and depending on the\n environment, will differ from the printers share name. Wildcards are automatically applied so only a unique partial value\n is required.\n\n Additional Notes:\n The local user account will need to have authorization from the print server in order to download printer drivers\n automatically. If you are not using directory services, you may need to deploy a separate worklet to install printer\n drivers before attempting to add a network printer.\n.EXAMPLE\n $prntSvr = \"SERVER-WC01\"\n $shareName = \"Printer1\"\n $fName = \"mx470\"\n.NOTES\n Author: eliles,spetrov\n Date: March 17, 2021\n#>\n\n######## Make changes within this block ########\n$prntSvr = \"\"\n$shareName = \"\"\n$fName = \"\"\n###############################################\n\n# Evaluates if printer exists, then checks to see if scheduled task is still present\nif(((get-printer).computername -like $prntSvr) -and ((get-printer).name -like \"*$fName*\"))\n{\n if(Get-ScheduledTask -TaskName \"Add_Printer_$shareName\" -ErrorAction SilentlyContinue)\n {\n Write-Output \"Printer and Task found - Flagging for cleanup\"\n Exit 1\n }\n Write-Output \"Printer Installed\"\n Exit 0\n}\nWrite-Output \"Printer not installed - Flagging for remediation\"\nexit 1",
- "remediation_code": "<#\n.SYNOPSIS\n Install Network Printer - Remediation Script\n OS Support: Windows 8(Server 2012) and above\n Powershell: 3.0 and above\n Run Type: Evaluation or OnDemand\n.DESCRIPTION\n This worklet is designed to grant an Admin the ability to install a network printer on a device. A scheduled task\n will be created (Add_Printer) that runs at user logon. The task will attempt to connect to the network printer, and\n install if reachable. The scheduled task will be removed in future remediation cycles as long as the specified printer\n is found as installed.\n\n Usage:\n Three variables are utilized for this template. They represent the \\\\Server\\Share path of a network printer, and the\n friendly name represented to the user. All items should be enclosed in quotation marks.\n\n $prntSvr: This is the Name or IP Address of the print server hosting the network printer. Only supply the Name or IP\n address without the \"\\\" symbols.\n\n $shareName: This is the printers share name. Only supply the printers share name without the \"\\\" symbols. This variable\n will also be added to the task for easier identification when running multiple worklets. Avoid using share names that\n contain spaces.\n\n $fName: This is the friendly name of the printer. This name will typically reference model numbers and depending on the\n environment, will differ from the printers share name. Wildcards are automatically applied so only a unique partial value\n is required.\n\n Additional Notes:\n The local user account will need to have authorization from the print server in order to download printer drivers\n automatically. If you are not using directory services, you may need to deploy a separate worklet to install printer\n drivers before attempting to add a network printer.\n.EXAMPLE\n $prntSvr = \"SERVER-WC01\"\n $shareName = \"Printer1\"\n $fName = \"mx470\"\n.NOTES\n Author: eliles,spetrov\n Date: March 17, 2021\n#>\n\n######## Make changes within this block ########\n$prntSvr = \"\"\n$shareName = \"\"\n$fName = \"\"\n###############################################\n\n# Evaluates if printer exists. If printer and task exists task is removed\nif(((get-printer).computername -like $prntSvr) -and ((get-printer).name -like \"*$fName*\"))\n{\n if(Get-ScheduledTask -TaskName \"Add_Printer_$shareName\" -ErrorAction SilentlyContinue)\n {\n try\n {\n Unregister-ScheduledTask -TaskName \"Add_Printer_$shareName\" -Confirm:$false\n }\n catch\n {\n Write-Output \"Removal of task failed.\"\n Exit 1\n }\n Write-Output \"Removed Task - Printer Installed.\"\n Exit 0\n }\n Write-Output \"Printer Installed\"\n Exit 0\n}\n\n# Checking to see if scheduled task is already present\nif(Get-ScheduledTask -TaskName \"Add_Printer_$shareName\" -ErrorAction SilentlyContinue)\n {\n Write-Output \"Scheduled task already present - Awaiting printer installation\"\n Exit 0\n }\n\n# Creating scheduled task for user logon to add the specified printer\ntry\n{\n $ShedService = New-Object -comobject 'Schedule.Service'\n $ShedService.Connect()\n\n $Task = $ShedService.NewTask(0)\n $Task.RegistrationInfo.Description = \"Adds a network shared printer upon user login.\"\n $Task.Settings.Enabled = $true\n $Task.Settings.AllowDemandStart = $true\n\n $trigger = $task.triggers.Create(9)\n $trigger.Enabled = $true\n\n $action = $Task.Actions.Create(0)\n $action.Path = \"Powershell.exe\"\n $action.Arguments = \"-windowstyle hidden -command `\"if(((get-printer).computername -like `'$prntSvr`') -and ((get-printer).name -like `\"*$fName*`\")){exit 0};if(Test-Connection -ComputerName $prntSvr -BufferSize 16 -Count 1 -Quiet){Add-Printer -ConnectionName `\"\\\\$prntSvr\\$prntName`\"}\"\n\n $taskFolder = $ShedService.GetFolder(\"\\\")\n $taskFolder.RegisterTaskDefinition(\"Add_Printer_$sharename\", $Task , 6, \"Users\", $null, 4) | Out-Null\n}\ncatch\n{\n Write-Output \"Scheduled task creation failed.\"\n Exit 1\n}\nWrite-Output \"Scheduled task created successfully.\"\nExit 0",
- "create_time": "2021-03-29T20:12:24Z",
- "update_time": "2023-08-17T18:12:06Z"
}