Take picture from webcam with PowerShell?

Have tried some scripts/functions from technet that is going to take photos from webcam trough PowerShell, but they look a little out of date and i havent got them to work.

Anyone who have a way that works?

Well, that would depend on the camera maker/model and what kind of interface(s) the manufacturer is exposing. If controls are exposed via a typical web gui, you can build PS functions that would perform discrete tasks on a given camera taking input like IPv4Address, a Credential object, and action - example of action would be to take picture. You would build these PS functions around invoke-webrequest to read the controlling web page, identify what buttons to push and executing required action(s). The page might be dynamic, or having client side java scripts that may need additional work and/or tools to get the desired result.

If the manufacture exposes some REST API, making PS commands to control would be much easier…

You can also hack the blessed thing, which is typically running some Linux version, identify what commands the web interface is calling and call them directly from PS. You would use something like POSH-SSH to do SSH session from PS to the Camera OS, and invoke the needed commands to take pictures or do whatever actions needed…