SnipeitPS icon indicating copy to clipboard operation
SnipeitPS copied to clipboard

Set-SnipeitConsumable

Open michaelredus opened this issue 3 years ago • 2 comments
trafficstars

Context

I need to check out an RFID badge blank (already added as a consumable in Snipe-IT) to every user upon account creation. I see the command Set-SnipeitConsumable which I thought may accomplish this, but it seems to perform the same function as New-SnipeitConsumable. Unless I am missing something, there is no way to assign a consumable via SnipeitPS.

Thanks!

Your Environment

  • SnipeitPS Module version used: 1.10.220
  • Operating System and PowerShell version: Windows Server 2016 Core / PS Version 5.1.17763.2268
  • Snipe It version: v5.4.0

Expected Behavior

To be able to check out a consumable via PS.

Current Behavior

There seems to be no way currently to accomplish this task.

michaelredus avatar Mar 02 '22 16:03 michaelredus

Thanks for reporting this, this feature is missing indeed. It seems that there's now api available to do this /consumables/:id/checkout

So this can be added, but I can't promise any timeframe for this. So PR is wellcome. :) It could be something like it done with accessories: Get-SnipeitConsumableOwner and Reset-SnipeitConsumableOwner . To keep commands work in same way with different entities.

In logger run it would make sense to combine all *owner commands to set-commands, as it's where people are first looking checkout/checkin functionality.

PetriAsi avatar Mar 02 '22 17:03 PetriAsi

Awesome, glad to hear that it may be coming! It will be a giant help whenever it does come. Yeah I agree with keeping the commands in the same format - I was confused when typing that earlier lol but glad to see you were able to understand it.

michaelredus avatar Mar 02 '22 21:03 michaelredus