Comments (9)
Hiyo! Not at a computer but there should be something like a -Presence
switch on Get-SlackUser
Cheers!
from psslack.
from psslack.
Hmm - Only thing I could think of is you might run into users who manually set their presence? Some notes on what the API returns here:
https://api.slack.com/docs/presence-and-status#user_presence
If that still isn't right, you could poke around the various methods. If you spot something promising, check out Send-SlackAPI
, and if there isn't a command already, would love a PR (or issue saying 'this method would be helpful!')
Good luck!
from psslack.
Spoke too soon : )
Guessing we can use https://api.slack.com/methods/team.billableInfo
and map those to users.
Here's some demo code (requires token from an admin user...)
PS /Users/wframe/sc/PSSlack> $b = Send-SlackApi -Method team.billableInfo
PS /Users/wframe/sc/PSSlack> $b.billable_info
U196FJ669 U18UM756J U5Z0JEJ67
--------- --------- ---------
@{billing_active=False} @{billing_active=False} @{billing_active=False}
PS /Users/wframe/sc/PSSlack> $b.billable_info.psobject.properties.name
U196FJ669
U18UM756J
U5Z0JEJ67
If that works for you, could probably get started. I'll likely add a switch to Get-SlackUser
that opts in to hitting that method to add details on whether accounts are billable to each user object
But... probably not for a while : ) Also, not sure if that represents data which would help you (it could at least add context - account hasn't touched slack in X days, I think?)
Cheers!
from psslack.
from psslack.
Hiyo!
Any chance you could try the billing_info
branch? Added a -Billing
switch that tosses a BillingActive
property on each user - that said, I'm not an admin on an account that is billed!
Thanks!
from psslack.
from psslack.
Awesome, thanks for testing! merging and deploying now - cheers!
from psslack.
from psslack.
Related Issues (20)
- Could not create SSL/TLS secure channel HOT 1
- Add function Disable-User
- New-SlackMessageAttachment: "Severity" parameter syntax incorrect and the parameter also appears non-functional?
- Add feature: Start-Call HOT 2
- Add New-SlackMessageBlock
- Support -Uri in Send-SlackFile cmdlet
- Add support to integrate Sending attachment in Send-SlackMessage instead of Send-SlackFile
- Conversations API deprecation - Get-SlackGroup HOT 1
- Authentication does not work with new Apps HOT 6
- The build script is totally hosed ...
- Get-SlackUser needs to be paginated to get all users
- Send Slack Message to user HOT 1
- PowerShell Objects formatted as Code Blocks
- Windows 11 Support? "The platform is windows 10 but the native module could not be found" HOT 1
- Find-SlackMessage's Raw switch doesn't work
- Tagging a user within a channel doesnt work I get the following
- Get-SlackUser -Billing parm does not seem to work.
- Discord equivalent?
- Get-SlackUsers -ExcludeBots doesn't work
- Get-SlackUsers inconsistent values: First name Last_Name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psslack.