Windows 10: Getting Powershell Return Code 2147942401

Discus and support Getting Powershell Return Code 2147942401 in Windows 10 Software and Apps to solve the problem; 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... Discussion in 'Windows 10 Software and Apps' started by Damon M, Dec 27, 2022.

  1. Damon M Win User

    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 devices that have not checked in for 90+ days, and then writes the output to a file.The second script pulls the DeviceIDs from the file and uses them to remove matching devices from our local AD.Both of the scripts work when run manually using the -WhatIf parameter and dummy data. But when I load them into a scheduled task, the

    :)
     
    Damon M, Dec 27, 2022
    #1
Thema:

Getting Powershell Return Code 2147942401

Loading...
  1. Getting Powershell Return Code 2147942401 - Similar Threads - Getting Powershell 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. Powershell - object return

    in Windows 10 Software and Apps
    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...
  5. 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...
  6. Not getting Code returned

    in Windows 10 Network and Sharing
    Not getting Code returned: When trying to enter Activity when already signed in I selected text to receive a code to verify Identity but no code is being sent??? Phone # is on account and entered correctly....
  7. Install Office 365 get 1603 return code

    in Windows 10 Installation and Upgrade
    Install Office 365 get 1603 return code: Hi Team, I am trying to install O365 once click the setp.exe, if you running the setup.exe it will appear few seconds from task manager. Wed, 19 Aug 2020 14:08:21 processing of package is complete, result -1917516221 0x8db50643 - code 1603...
  8. I get a bad return code on "Stop CryptSvc" task

    in Windows 10 Customization
    I get a bad return code on "Stop CryptSvc" task: Hi Shawn, [img] I am running a simple (2 lines) script called "Stop CryptSvc" saved in C:\ that starts on event 1074 and sometimes (1 out of 30) I get a bad return code, the task runs 2 sec too late (after apps delayed the task) or the task runs OK but the CryptSvc...
  9. I keep getting this error 4.0.30319 with a return code of 0xC00CE556

    in Windows 10 Customization
    I keep getting this error 4.0.30319 with a return code of 0xC00CE556: I don't really know it's like if I open a app it just shows me that error and the app immediately crashes https://answers.microsoft.com/en-us/windows/forum/all/i-keep-getting-this-error-4030319-with-a-return/45cf510b-30a1-45a1-8d19-009a4a84d6f7
  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],...