Hi All
i want to pull all my windows servers with their powershell shell version and OS version in my organization, how do i export this information from sccm, experts guide me on this
Hi All
i want to pull all my windows servers with their powershell shell version and OS version in my organization, how do i export this information from sccm, experts guide me on this
1.For querying the power shell version, please refer to this helpful guide:
powershell-inventory-reports
Note:This article is non-official articles just for your reference.
2.For querying the OS version,Please refer to this link:
Get-OS-Info-from-SCCM
3.If the OS query was too old for us, maybe we could use sql query to have a try. I have use this query in my environment and it works.
Here is the query code below:
select Distinct
v_R_System.Name0,
v_GS_NETWORK_ADAPTER_CONFIGURATION.IPAddress0,
v_GS_NETWORK_ADAPTER_CONFIGURATION.DNSHostName0,
v_GS_NETWORK_ADAPTER_CONFIGURATION.DNSDomain0,
v_GS_OPERATING_SYSTEM.Caption0 as 'Operating System',
v_GS_OPERATING_SYSTEM.CSDVersion0 as 'Service Pack',
dbo.v_FullCollectionMembership.SiteCode,
CASE
WHEN dbo.v_FullCollectionMembership.SiteCode LIKE 'A%' THEN 'India'
WHEN dbo.v_FullCollectionMembership.SiteCode LIKE 'O%' THEN 'UK'
ELSE 'Unidentified' END AS 'Country'
from v_R_System
INNER JOIN dbo.v_FullCollectionMembership ON dbo.v_R_System.ResourceID = dbo.v_FullCollectionMembership.ResourceID
Inner Join v_GS_OPERATING_SYSTEM ON v_GS_OPERATING_SYSTEM.Resourceid=v_R_System.Resourceid
Inner join v_GS_NETWORK_ADAPTER_CONFIGURATION ON v_GS_NETWORK_ADAPTER_CONFIGURATION.ResourceID=v_R_System.ResourceID
where (dbo.v_FullCollectionMembership.SiteCode != 'NULL') and (Operating_System_Name_and0 != 'NULL')
Hope this could help you.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
thanks but not sure how to pull windows powershell version,
the query to be used shud be something like %windir%\System32\WindowsPowerShell\v
Maybe we could use the SCCM to deploy the power shell script to list some information that we want.
The script was shown as below:
$ostype = (Get-WMIObject win32_operatingsystem).caption
$temp = "{0,-15}{1,-45}{2,-15}" -f "Computername","OS Version","PowerShell Version" | out-file -filepath "shared folder path.txt" -append
if ($ostype -match "server")
{$temp= "{0,-15}{1,-45}{2,-15}" -f $env:COMPUTERNAME,$ostype,$PSVersionTable.PSVersion | out-file -filepath "shared folder path.txt" -append} 
Here is a helpful guide to deploy the script:
https://systemcenterdudes.com/sccm-deploy-powershell-script/
Note: This is non-official article just for your reference.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Just checking in to see if there is any update. We haven't heard from you for a few days and would like to know the current status of the problem. Is the problem solved? Do you need any further assistance? Look forward to hearing from you.
3 people are following this question.