Jun 15 2021 04:33 AM - edited Jun 15 2021 04:35 AM
I am trying to execute a PowerShell script on all Intune managed machines and collect the output of the script afterwards.
Echo "Hello World from $env:computername"
I managed to upload and execute the PowerShell script using Devices > Policy > Scripts sections, but I cannot get the output of the script.
What is the right approach to collect such data? Where can I see the "Hello world from MY-DEVICE" printed, or what system should I use to retrieve the information?
Jun 15 2021 07:56 AM
Jun 15 2021 08:12 AM
Jun 15 2021 08:28 AM
Jan 23 2024 06:08 AM
@Rudy_Ooms_MVP We have this script below
$computer = $env:COMPUTERNAME
$namespace = "ROOT\CIMV2"
$classname = "Win32_InstalledWin32Program"
Write-Output "====================================="
Write-Output "COMPUTER : $computer "
Write-Output "CLASS : $classname "
Write-Output "====================================="
Get-WmiObject -Class $classname -ComputerName $computer -Namespace $namespace |
Select-Object Name,Vendor
Which is giving below mention output on local device
Mozilla Firefox (x64 en-US) Mozilla
Mozilla Maintenance Service Mozilla
Microsoft 365 - en-us Microsoft Corporation
Microsoft 365 Apps for enterprise - en-us Microsoft Corporation
Microsoft OneDrive Microsoft Corporation
Microsoft OneNote - en-us Microsoft Corporation
USBPcap 1.5.4.0 Tomasz Mon
FortiClient Fortinet Technologies Inc
Rapid7 Insight Agent Rapid7, Inc.
ImageRight Document Converter Vertafore, Inc.
Remote Desktop Microsoft Corporation
OpenSSL (64-bit) Shining Light Productions
ImageRight PDF Printer Vertafore, Inc.
Local Administrator Password Solution Microsoft Corporation
Microsoft Teams Meeting Add-in for Microsoft Office Microsoft
NVIDIA Graphics Driver 537.79 NVIDIA Corporation
Zoom (64-bit) Zoom
Microsoft Update Health Tools Microsoft Corporation
Power BI Report Builder Microsoft Corporation
Google Chrome Google LLC
DisplayLink Graphics DisplayLink Corp.
Microsoft Edge Microsoft Corporation
Microsoft Edge Update
Microsoft Edge WebView2 Runtime Microsoft Corporation
Npcap Nmap Project
Lenovo Vantage Service Lenovo Group Ltd.
Wireshark 4.2.2 x64 The Wireshark developer community, https://www.wiresha...
Microsoft Visual C++ 2015-2022 Redistributable (x64) - 14.38.33130 Microsoft Corporation
ImageRight Microsoft Add In Vertafore, Inc.
Jabra Xpress GN Audio A/S
Configuration Manager Support Center Microsoft Corporation
Teams Machine-Wide Installer Microsoft Corporation
Microsoft Intune Management Extension Microsoft Corporation
Adobe Acrobat Reader Adobe Systems Incorporated
Clean Your Device Lenovo
ImageRight Desktop Vertafore, Inc.
Microsoft Teams classic Microsoft Corporation
Microsoft Visual Studio Code (User) Microsoft Corporation
Now i want to send this script to other device and capture that with me using Intune , would you please suggest i can collect
Jan 23 2024 06:14 AM
Jan 23 2024 06:28 AM