Windows 10: Powershell - object return

Discus and support Powershell - object return in Windows 10 Software and Apps to solve the problem; Hello, I made a simple program that print specified computers in our Domain, sadly there is a problem with returning an object from a function after... Discussion in 'Windows 10 Software and Apps' started by Lewandowski Bartłomiej, Apr 12, 2023.

  1. Powershell - object return


    Hello, I made a simple program that print specified computers in our Domain, sadly there is a problem with returning an object from a function after call. First call does not work, 2nd print same output 2 times. Do you have any idea how to display it in a first run? As far as i know it is a problem that get-ad makes object and objects are not so eazy to return from function. function MyFunctionOne{ $Computers=Get-ADComputer -Filter * -Properties MemberOf,description Where-Object {[STRING]$_.MemberOf -notlike "*GroupNa

    :)
     
    Lewandowski Bartłomiej, Apr 12, 2023
    #1
  2. Kursah Win User

    PowerShell instead of Commandline in Creators Update

    Interestingly enough my personal laptop just got the update...and still has Command Prompt listed, not PowerShell...

    Edit: Not that it matters...I use both regularly. *Toast :toast:
     
    Kursah, Apr 12, 2023
    #2
  3. Window.Open() Returns Empty Object

    Greetings,

    I have encountered a bug in the Edge browser's Javascript implementation of window.open(). The bug is present in 10240 and 10568.104. When the 'open' function is called, there should be an object returned that is the newly opened window. Inspecting or
    hovering over the returned object from within the Debugger should reveal all of it's publicly available functions and properties.

    When I hover, I am only seeing the message:

    * popup [object]

    When I type the name of the variable containing the returned object into the Console, the following happens:

    * Nothing for 20 seconds, then I get:

    > [object Object] {applicationCach: Object{...}, blur: [object {...}, .. etc

    At this point I can expand the arrow and see the publicly exposed functions and properties.

    But then, if I go back to the Debugger and hover I only see "popup [object]".

    Specifically, I am testing for the existence of the 'postMessage' member after the call to window.open() and receiving this error message:

    SCRIPT449: Argument not optional

    Do you have any information about this bug, and when or if a fix for it might be available?

    Kind regards,

    -Greg
     
    GregDalbey, Apr 12, 2023
    #3
  4. Brink Win User

    Powershell - object return

    Mail app will not open on 10041.

    Hello Adam,

    This is the suggested solution below if you haven't already tried it. Powershell - object return :)

    In this Windows 10 build 10041, the Mail, Calendar, and People apps may be broken due to a licensing issue with the Store Beta. To get these apps working again, you need to follow these steps:

    • Open powershell as administrator
    • Run the command Get-appxprovisionedpackage –online | where-object {$_.packagename –like “*windowscommunicationsapps*”} | remove-appxprovisionedpackage –online
    • Re-install Mail, People and Calendar from the Store (green tile)
     
    Brink, Apr 12, 2023
    #4
Thema:

Powershell - object return

Loading...
  1. Powershell - object return - Similar Threads - Powershell object return

  2. Powershell - object return

    in Windows 10 Customization
    Powershell - object return: Hello, I made a simple program that print specified computers in our Domain, sadly there is a problem with returning an object from a function after call. First call does not work, 2nd print same output 2 times. Do you have any idea how to display it in a first run? As far as...
  3. Powershell - object return

    in Windows 10 Gaming
    Powershell - object return: Hello, I made a simple program that print specified computers in our Domain, sadly there is a problem with returning an object from a function after call. First call does not work, 2nd print same output 2 times. Do you have any idea how to display it in a first run? As far as...
  4. Getting Powershell Return Code 2147942401

    in Windows 10 Gaming
    Getting Powershell Return Code 2147942401: I'm trying to run a capture of devices in AAD that have not checked in for 90+ days then remove the corresponding AD devices. Using scripts deployed through the Task Scheduler.The process is currently two separate scripts. The first script connects to AAD, searches for...
  5. Getting Powershell Return Code 2147942401

    in Windows 10 Software and Apps
    Getting Powershell Return Code 2147942401: I'm trying to run a capture of devices in AAD that have not checked in for 90+ days then remove the corresponding AD devices. Using scripts deployed through the Task Scheduler.The process is currently two separate scripts. The first script connects to AAD, searches for...
  6. Powershell proccessing Outlook objects, running out of memory.

    in Windows 10 Gaming
    Powershell proccessing Outlook objects, running out of memory.: Hello.I've created a script to delete duplicates in large mailboxes. This mailboxes have many duplicates since we did import of mail archives into those mailboxes.For that, i want to use group-object cmdlet, to collect all duplicates, than remain only 1 in each group.But...
  7. Powershell proccessing Outlook objects, running out of memory.

    in Windows 10 Software and Apps
    Powershell proccessing Outlook objects, running out of memory.: Hello.I've created a script to delete duplicates in large mailboxes. This mailboxes have many duplicates since we did import of mail archives into those mailboxes.For that, i want to use group-object cmdlet, to collect all duplicates, than remain only 1 in each group.But...
  8. Powershell proccessing Outlook objects, running out of memory.

    in Windows 10 BSOD Crashes and Debugging
    Powershell proccessing Outlook objects, running out of memory.: Hello.I've created a script to delete duplicates in large mailboxes. This mailboxes have many duplicates since we did import of mail archives into those mailboxes.For that, i want to use group-object cmdlet, to collect all duplicates, than remain only 1 in each group.But...
  9. Powershell objects to space in username

    in AntiVirus, Firewalls and System Security
    Powershell objects to space in username: Powershell won't change directory because of the space in my username "Andy Kay". I understand I can change my username, but that it won't change the name in the path. Is there a way around this?...
  10. Why does Powershell return an error for Get-MpComputerStatus ?

    in Windows 10 Support
    Why does Powershell return an error for Get-MpComputerStatus ?: Instead it returns "Get-MpComputerStatus : The extrinsic Method could not be executed. at line:1 char:1 + Get-MpComputerStatus + ~~~~~~~~~~~~~~~~~~~~~~~~~ + Categorylnfo : MetadataError: (MSFT_HpComputerStatus:ROOT\Microsoft\...pComputerStatus) [Get-MpComputer Status],...