Thursday, April 15, 2021

Tuesday, December 13, 2016

To get physical hostname

SELECT  dbo.v_GS_OPERATING_SYSTEM.Caption0, dbo.v_GS_VIRTUAL_MACHINE_64.PhysicalHostName0, dbo.v_R_System.Name0
FROM    dbo.v_R_System INNER JOIN
           dbo.v_GS_OPERATING_SYSTEM ON dbo.v_R_System.ResourceID = dbo.v_GS_OPERATING_SYSTEM.ResourceID INNER JOIN
           dbo.v_GS_VIRTUAL_MACHINE_64 ON dbo.v_GS_OPERATING_SYSTEM.ResourceID = dbo.v_GS_VIRTUAL_MACHINE_64.ResourceID

  where v_r_system.name0 in (

Monday, November 16, 2015

DP Content checking

--DP content status:
use sms
SELECT     v_PackageStatusDistPointsSumm.PackageID,
                      v_Package.Name, v_PackageStatusDistPointsSumm.InstallStatus, v_PackageStatusDistPointsSumm.SiteCode, v_PackageStatusDistPointsSumm.ServerNALPath,
                      v_PackageStatusDistPointsSumm.SourceVersion, v_PackageStatusDistPointsSumm.State, v_PackageStatusDistPointsSumm.LastCopied,
                      v_PackageStatusDistPointsSumm.SourceNALPath, v_PackageStatusDistPointsSumm.SummaryDate
FROM         v_PackageStatusDistPointsSumm INNER JOIN
                      v_Package ON v_PackageStatusDistPointsSumm.PackageID = v_Package.PackageID
WHERE     (v_PackageStatusDistPointsSumm.ServerNALPath LIKE '%XXX%')---and InstallStatus <> 'Package Installation complete'
--WHERE     (v_PackageStatusDistPointsSumm.ServerNALPath LIKE '%.stores.target.com%')and InstallStatus <> 'Package Installation complete'
--and Name like '%neil%'1
--order by  name, v_PackageStatusDistPointsSumm.InstallStatus
and InstallStatus != 'Package Installation complete'



Note: in XXX put your DP name

Tuesday, October 6, 2015

PowerShell script to check WDS Service status against of List of servers.

Below is a PowerShell script, this will list WDS Service status against of List of servers.



$InPutComputersList = get-content "c:\MyScripts\list.txt"
$OutPutFile = "c:\MyScripts\WDS_ServiceStatus.csv"
$NotReachble = "c:\MyScripts\NonPingSystems.csv"
$listResult = @()
foreach($ForEverComputerIntheTextFilelinebyLine in $InPutComputersList) {
if (test-path \$ForEverComputerIntheTextFilelinebyLine\c$\windows\write.exe)
{
$objService = Get-Service WDSServer -ComputerName $ForEverComputerIntheTextFilelinebyLine | select machinename, status, name, displayname

$objResult = New-Object PSObject -Property @{
ComputerName = $ForEverComputerIntheTextFilelinebyLine
ServiceStatus = $objService.Status
ServiceDisplayName = $objService.DisplayName
ServiceName = $objService.Name

}
$listResult += $objResult
}
Else
{
Write-Output "$ForEverComputerIntheTextFilelinebyLine,NotReachable" | out-file $NotReachble -append
}
}
$listResult| Export-Csv -Path $OutPutFile

Friday, September 18, 2015

for a single computer add or remove programs info

Select v_Add_Remove_Programs.DisplayName0, v_Add_Remove_Programs.Publisher0, v_Add_Remove_Programs.Version0
FROM v_Add_Remove_Programs
JOIN  v_R_System ON v_Add_Remove_Programs.ResourceID = v_R_System.ResourceID
WHERE v_R_System.Netbios_Name0 = @computername

Hardware Inventory last scanned

SELECT SYS.Netbios_Name0 as 'Computer Name',
SIS.SMS_Installed_Sites0 as 'SMS Site', WS.LastHWScan,
DATEDIFF(day,WS.LastHWScan,GETDATE()) as 'Days Since HWScan'
FROM v_GS_WORKSTATION_STATUS WS INNER JOIN v_R_System SYS
ON WS.ResourceID = SYS.ResourceID INNER JOIN v_RA_System_SMSInstalledSites SIS
ON WS.ResourceID = SIS.ResourceID
WHERE SYS.Client_Type0 = 1 AND SYS.Active0 = 1 AND
WS.LastHWScan < DATEADD([day],+1,GETDATE())

Friday, September 11, 2015

scvmm pre-requsites

Pre-reqs:

Service account
Service account should have local admin privileges
Service account should have access in VMMKKM Container
Service account and  VMMKKM Container should be on same domain
SQL native Client
Cluster name should have access on SCVMM name
(CNO should be properties of VCO security and full control)
SCVMM service name and should have static IP
Service account should have SQL direct access , kind of  DB owner access
Always on should be off incase SQL DB already pre-staged
(always on is a HA solution for the sql DB)
Use sql port 1433
Use all default ports

Logon service group - secpol.msc - should have access to service account 

SCCM to Tanium

SCCM transition Options: of course intune otherwise  Deployment, Patching - Tanium Image - Tazier Inventory - Tanium Remote Control - Zoom  ...