Powershell : to check inboxes and sort by largest file

Get-ChildItem "F:\SMSPKGF$" -recurse | Where {!$_.PSIsContainer} | Group Directory | sort-object count -descending | Format-Table Name, Count -autosize

SCCM SQL Query : Get Machine and User Information From A Specified Collection

SelectSD.Name0 ‘Machine Name’,SD.Resource_Domain_OR_Workgr0 ‘Resource Domain’,SD.User_Name0 ‘Login ID’,SD.User_Domain0 ‘Account Domain’,USR.Full_User_Name0 ‘Full Name’,PCB.SerialNumber0 ‘Serial Number’,CS.Manufacturer0 Manufacturer,CS.Model0 Model,SAS.SMS_Assigned_Sites0 ‘Assigned Site Code’From v_R_System SDJoin v_FullCollectionMembership FCM on SD.ResourceID = FCM.ResourceIDJoin v_Collection COL on FCM.CollectionID = COL.CollectionIDJoin v_R_User USR on SD.User_Name0 = USR.User_Name0Join v_GS_PC_BIOS PCB on SD.ResourceID = PCB.ResourceIDJoin v_GS_COMPUTER_SYSTEM CS on SD.ResourceID = CS.ResourceIDJoin v_RA_System_SMSAssignedSites SAS on SD.ResourceID = … Continue reading SCCM SQL Query : Get Machine and User Information From A Specified Collection

SCCM SQL Query : To Enumerate ConfigMgr 2007 Boundaries

Select Value,SiteCode,‘Boundary Type’ = CaseWhen BoundaryType = 0 Then ‘IP Subnet’When BoundaryType = 1 Then ‘Active Directory Site’When BoundaryType = 2 Then ‘IPv6 Prefix’When BoundaryType = 3 Then ‘IP Address Range’Else ‘UnKnown’End,DisplayName,‘Connection’ = CaseWhen BoundaryFlags = 0 Then ‘Fast’When BoundaryFlags = 1 Then ‘Slow’Else ‘UnKnown’End,‘Protected’ = CaseWhen Action = 0 Then ‘No’When Action = 1 Then … Continue reading SCCM SQL Query : To Enumerate ConfigMgr 2007 Boundaries