# Function Return

**URL:** https://forums.powershell.org/t/function-return/18247
**Category:** Open Discussions
**Created:** [December 28, 2021, 12:16pm UTC](https://forums.powershell.org/t/function-return/18247 "2021-12-28T12:16:20Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)
#### Post date: [December 28, 2021, 12:35pm UTC](https://forums.powershell.org/t/function-return/18247/2 "2021-12-28T12:35:25Z")

</div>

Obviously you already used functions …

> [@Having problems with Get-WmiObject in AD](https://forums.powershell.org/t/having-problems-with-get-wmiobject-in-ad/13180):
>
> Hi all, I posted [this](https://powershell.org/forums/topic/function-that-will-determined-if-a-computer-is-laptop-or-desktop/) before and i know that i wrote that everything works fine but i was wrong. I needed it for something in my job and we delayed the project and that’s why i didn’t use it up to now. The whole script eventually doing half the job. Now, it seems that whenever i run the command where the computer name comes from the command "Get-ADComputer " it return an error of RPC on the “Get-WmiObject” but if i put manually the name of the computer it runs good. &nbsp; The functions is: #F…

What exactly do you have problems with? If you want to (re-)use the output of a cmdlet or function you always can save it to a variable.

---

_[View the full topic](https://forums.powershell.org/t/function-return/18247)._
