Git Product home page Git Product logo

Comments (2)

jeffreymcclain avatar jeffreymcclain commented on July 18, 2024

I know this Issue was opened a while ago, but just to verify does

Update-GSUser -User "[email protected]" -Archived:$true

and

Update-GSUser -User "[email protected]" -Archived:$false

work as expected with the existing function and meet your desired use case?

According to the Microsoft documentation for PowerShell Switch parameter design considerations
"Explicitly setting a switch from a boolean can be done with -MySwitch:$boolValue and in splatting with $params = @{ MySwitch = $boolValue }.

To your point, the Update-GSUser.ps1 function parameters could be changed from switches to booleans, but this might break existing uses of the function by other users. Someone could also create an alternate version of the function that has booleans instead of switches as a difference, but that also seems a bit excessive if the above workaround is functional.

from psgsuite.

dominikduennebacke avatar dominikduennebacke commented on July 18, 2024

Hi @jeffreymcclain, sorry for my late reply as well.

Update-GSUser -User "[email protected]" -Archived:$false does work as expected. Thanks for pointing it out. I was not aware you can explicitly set a swich parameter.

I have hence closed the ticket.

from psgsuite.

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.