Code Monkey home page Code Monkey logo

Comments (1)

brianbunke avatar brianbunke commented on May 25, 2024 1

Welcome!

To the best of my knowledge, this is an API limitation. Using -Expand, I personally haven't seen a result >100. If you drop -Expand, you can at least return 500, if not more. (Side note: I've split off some of my automated pages into a dedicated space to help deal with this.)

To date, my workaround has been to use Get-WikiPage without -Expand, find the Title/PageID I'm actually looking for, and then use PageID in a more targeted -Expand call.

So far, the only properties I include in -Expand are Version and Body. I plan to add more in the future, but probably not the near future. From your examples, you can grab (and filter by) Title without having to expand.

# Your second example could just drop the -Expand altogether
$pages = Get-WikiSpace -Name "KB" | Get-WikiPage -Limit 300
$pages.Title | Measure-Object -Line

Lines
-------
107-ish 😄

# This works, but will take forever, and each page's Body will consume a lot of memory
Get-WikiSpace -Name "KB" | Get-WikiPage -Limit 500 | Get-WikiPage -Expand
# If possible, I'd encourage filtering as much as possible before using -Expand
Get-WikiSpace -Name "KB" | Get-WikiPage -Limit 500 -Title 'reboot' | Get-WikiPage -Expand

Let me know if I'm lying. I hope the module ends up being useful for you!

from confluenceps.

Related Issues (20)

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.