Giter Club home page Giter Club logo

wilmapsworker's Introduction

WilmaPSWorker

Powershell tools for Visma Wilma and optionaly also with Primus via primusquery

Overview

Collection of tools that make working with Wilma little bit easier and more secure. This module requires powershell version 7 to run. It runs nicely side by side with older one so dont be shy and just install it

Features

Wilma features

  • Receive, send and reply wilma messages
  • Search and list messages recipients
  • Download profile pictures
  • Upload attachments
  • Dowload wilma printouts as pdf-files

Primusqury features

  • keeps your credentials safe, no need to write them on scripts
  • import and export data
  • automaticly parse csv or xml formatted queryresults to powershell objects

Multiple sites

Setup multiple sites for different wilma-sites or to use diffrent credentials.

Installation

Install module from PowerShell gallery

Install-Module WilmaPSWorker

Examples

Setup new site

To setup site with only wilma fuctionality use

New-WPSWSite -site MyWilma -wilma_url https://mysite.inschool.fi -wilma_apikey xxxxxxxxxxxxxx -wilma_cred (get-Credential -message "Wilma credentials")

To setup new site with wilma and primusquery access

New-WPSWSite -site MyWilma -wilma_url https://mysite.inschool.fi -wilma_apikey xxxxxxxxxxxxxx -wilma_cred (get-Credential -message "Wilma credentials") -pq_host primus.server.fi -pq_port 1222 -pq_cred (get-credential -Message "Primus credentials") -pq_exe "c:\Primusquery\primusquery.exe"

After you have setup the site, use just connect-wpswsite inside your scripts.

Connect site

Connect-WPSWSite

Search for message recipient

Get-WPSWRecipient -Search "petri asikainen" | ConvertFrom-Json

PersonnelRecords
----------------
{@{Id=107; Caption=Asikainen Petri (P.A); SchoolIDs=5,2,4,6,10,11,1; AllowPersonnel=}}

Send wilma message

Send-WPSWmessage -MessageBody "This is test message sent with powershell" -Subject "Testing again" -r_personnel 107
{"Status":"Sent"}

wilmapsworker's People

Contributors

petriasi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

wilmapsworker's Issues

Login with url parameters exposes passwords, switch to post

Currently logins exposes password when using Connect-WPSWSession command with -Verbose switch.

Expected Behavior

Passwords should not exposed

Current Behavior

Possible Solution

Use http post

Steps to Reproduce (for bugs)

Connect-WPSWSession -Verbose
will expose password in conncetion url

Support for url slugs / roles used by Wilma

Wilma provides slug prefixes for separate different roles under one user account

Expected Behavior

When user have multiple roles those should be available to select.

Current Behavior

Currently wilma user account with multiple roles does not work correcly.

Possible Solution

As roles are available only after login, we need to notify users to select role.
Then there's need for some kind of role selection command.

Connect-WPSWSession -> checks roles (Get-WPSWConnectionRole ?) and notifies users if needed.
Select-WPSWConnectionRole could be a command to switch between roles.
After role selection, all other commands should use selected role and it slug prefix.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.