{"id":629,"date":"2013-09-09T10:00:47","date_gmt":"2013-09-09T10:00:47","guid":{"rendered":"http:\/\/sccm.haas.se\/?p=629"},"modified":"2013-09-09T11:27:09","modified_gmt":"2013-09-09T11:27:09","slug":"report-of-all-packages-in-a-folder","status":"publish","type":"post","link":"https:\/\/sccm.haas.se\/?p=629","title":{"rendered":"Report of all Packages in a Folder"},"content":{"rendered":"<p>Yes, you can place the cursor on the Package Folder in the SCCM-console and select<br \/>\nShow-&gt;Export List to export all packages in a folder. BUT. There seems to be a limit to maximum 500 packages so you will not get all packages in your folder if you have a lot of them. AND maybe someone in management want the report as a webreport too&#8230; So here are the three things you need to do.<\/p>\n<p>1. Create the Report. Easy, I&#8217;ve got it here for you:<\/p>\n<pre>SELECT v_Package.PackageID, v_Package.Name, vSMS_Folders.Name AS Expr1\r\nFROM v_Package INNER JOIN\r\n vFolderMembers ON v_Package.PackageID = vFolderMembers.InstanceKey INNER JOIN\r\n vSMS_Folders ON vFolderMembers.ContainerNodeID = vSMS_Folders.ContainerNodeID\r\nWHERE (vSMS_Folders.Name LIKE @Foldername)\r\n<!--more--><\/pre>\n<p>Now you see there&#8217;s a variable there (@Foldername) so you have to Press Prompt and enter the values like here:<\/p>\n<p><a href=\"http:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/Prompt.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-630\" alt=\"Prompt\" src=\"http:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/Prompt-450x139.png\" width=\"450\" height=\"139\" srcset=\"https:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/Prompt-450x139.png 450w, https:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/Prompt.png 962w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>As you can see, I have a default value filled in because you cannot browse SCCM-folders from the Web-report. In this case my SCCM-folder is called &#8220;Orderable Applications&#8221;.<\/p>\n<p>Because the to SQL-Views vSMS_Folders and vFolderMembers are hidden you need to add rights for all Reporting Users to see those tables. If you&#8217;re not the SQL-Admin of your SCCM-database you might also need a beer for your admin here. (Personally I like craft beer.)<\/p>\n<p>In MS SQL Server Management Studio, open the properties for<em> dbo.vSMS_Folders<\/em> first:<\/p>\n<p><a href=\"http:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/sql.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-631\" alt=\"sql\" src=\"http:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/sql-450x313.png\" width=\"450\" height=\"313\" srcset=\"https:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/sql-450x313.png 450w, https:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/sql.png 937w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>Click on Search above and add <em>webreport_approle<\/em> to vSMS_Folder.<\/p>\n<p><a href=\"http:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/sql2.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-632\" alt=\"sql2\" src=\"http:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/sql2-450x133.png\" width=\"450\" height=\"133\" srcset=\"https:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/sql2-450x133.png 450w, https:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/sql2.png 999w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>Grant the Application Role\u00a0<em>webreport_approle<\/em> Select rights like below:<\/p>\n<p><a href=\"http:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/sql31.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-634\" alt=\"sql3\" src=\"http:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/sql31-450x405.png\" width=\"450\" height=\"405\" srcset=\"https:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/sql31-450x405.png 450w, https:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/sql31.png 700w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p><strong>Important:<\/strong> You have to the steps above again for\u00a0for the View <em>dbo.vFolderMembers<\/em>.<br \/>\nIf you&#8217;ve added rights for <strong>both<\/strong> Views you should be able to run your report which will look like this:<\/p>\n<p><a href=\"http:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/report.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-635\" alt=\"report\" src=\"http:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/report-450x146.png\" width=\"450\" height=\"146\" srcset=\"https:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/report-450x146.png 450w, https:\/\/sccm.haas.se\/wp-content\/uploads\/2013\/09\/report.png 966w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>That&#8217;s it. Good luck!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yes, you can place the cursor on the Package Folder in the SCCM-console and select Show-&gt;Export List to export all packages in a folder. BUT. There seems to be a limit to maximum 500 packages so you will not get all packages in your folder if you have a lot of them. AND maybe someone<\/p>\n<p class=\"text-right\"><span class=\"screen-reader-text\">Continue Reading&#8230; Report of all Packages in a Folder<\/span><a class=\"btn btn-secondary continue-reading\" href=\"https:\/\/sccm.haas.se\/?p=629\">Continue Reading&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[39,38,13],"_links":{"self":[{"href":"https:\/\/sccm.haas.se\/index.php?rest_route=\/wp\/v2\/posts\/629"}],"collection":[{"href":"https:\/\/sccm.haas.se\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sccm.haas.se\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sccm.haas.se\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sccm.haas.se\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=629"}],"version-history":[{"count":13,"href":"https:\/\/sccm.haas.se\/index.php?rest_route=\/wp\/v2\/posts\/629\/revisions"}],"predecessor-version":[{"id":648,"href":"https:\/\/sccm.haas.se\/index.php?rest_route=\/wp\/v2\/posts\/629\/revisions\/648"}],"wp:attachment":[{"href":"https:\/\/sccm.haas.se\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sccm.haas.se\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sccm.haas.se\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}