https://github.com/damsleth/k
SharePoint helper functions for doing common admin tasks from the console
https://github.com/damsleth/k
sharepoint userscript
Last synced: 6 months ago
JSON representation
SharePoint helper functions for doing common admin tasks from the console
- Host: GitHub
- URL: https://github.com/damsleth/k
- Owner: damsleth
- License: wtfpl
- Created: 2018-10-19T09:14:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-05-04T11:00:11.000Z (over 3 years ago)
- Last Synced: 2025-03-29T05:35:11.869Z (10 months ago)
- Topics: sharepoint, userscript
- Language: JavaScript
- Size: 10.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# k
SharePoint helper functions for doing common admin tasks from the console.
`k.js` is meant for on premises (i.e. SharePoint 2013, 2016 and 2019)
`k365.js` is for SharePoint Online (i.e. Microsoft 365, *yourtenant*.sharepoint.com )
### Usage
k.js is written as a userscript, so you can include it as a file for autoloading in Tampermonkey or Greasemonkey.
k.js logs a "k" to the console to indicate it's been loaded.
All commands are in the k namespace, e.g.
```
await k.fetch("/web/allproperties")
```
lists out all the web properties.
```
await k.getToken()
```
fetches a bearer token from `/_api/contextinfo` you can use for whatever
```
await k.ChangeWebProp("Title","My new site title")
```
Changes the title of the site you're on
### Requirements
Chromium or Firefox browser
Tampermonkey or Greasemonkey
A SharePoint Site