{"id":1934,"date":"2012-03-31T06:01:36","date_gmt":"2012-03-31T06:01:36","guid":{"rendered":"https:\/\/poiseddevelopers.com\/reality-tech\/?p=1934"},"modified":"2024-04-26T12:17:18","modified_gmt":"2024-04-26T12:17:18","slug":"reporting-on-anonymous-surveys","status":"publish","type":"post","link":"https:\/\/poiseddevelopers.com\/reality-tech\/reporting-on-anonymous-surveys\/","title":{"rendered":"Reporting on \u201cAnonymous\u201d surveys"},"content":{"rendered":"<h4>Reporting on Anonymous surveys<\/h4>\n<p>SharePoint enables the creation of anonymous surveys, but how anonymous are they?\u00a0\u00a0 If you want a truly anonymous survey, then you will want to create a new web application that allows anonymous access without authentication.\u00a0 Here\u2019s a\u00a0<a href=\"http:\/\/blogs.technet.com\/b\/vedant\/archive\/2009\/07\/13\/locking-down-SharePoint-sites.aspx\" target=\"_blank\" rel=\"noopener\" aria-label=\"TechNet article - open in a new tab\" data-uw-rm-ext-link=\"\">TechNet article\u00a0<\/a>with some good guidance on doing that.<\/p>\n<p>If you create an anonymous survey in a web application with authentication, the user information is captured, but is hidden to users, and even within the .NET Object model.\u00a0\u00a0 SharePoint will gladly create audit logs of access that can expose the survey use.\u00a0\u00a0\u00a0 Note that a site administrator with Full Control can change a survey to non-anonymous and expose the users.<\/p>\n<p>Using PowerShell, we can temporarily expose the users, report on them, then restore the anonymity.\u00a0 This is useful when needing to chase down non-respondents to a survey, without exposing which survey was completed by whom.\u00a0 Here\u2019s the PowerShell I wrote to achieve this.\u00a0 The console output is structure to allow text-to-column conversion or CSV reading in Excel, then easily pivot-table reporting on the results:<\/p>\n<pre lang=\"php\"> $web=Get-SPWeb href=\"http :\/\/SharePoint\/sites\/EXEC\r\n$lists=$web.Lists;\r\nWrite-Host \"List or Survey,Creator of List or Survey,List Creation Time,List Edit Time,Person completing Survey,Modified Date of list entry\"\r\nfor ($i=0; $i -lt $lists.count; $i++)\r\n{\r\n$list=$lists[$i]\r\nif (!$list.get_ShowUser())\r\n{\r\n$reversion=$true;\r\n$list.set_ShowUser($true)\r\n$list.update()\r\n}\r\nelse\r\n{\r\n$reversion=$false;\r\n}\r\n \r\nforeach ($item in $list.Items)\r\n{\r\nWrite-Host \"$($list.title), $($List.get_author()) , $($List.LastItemModifiedDate), $($List.Created), $($item['Author']),$($item['Created'])\"\r\n}\r\nif ($reversion)\r\n{\r\n$list.set_ShowUser($false)\r\n$list.Update();\r\n}\r\n \r\n}<\/pre>\n<p>During the running of the script, the survey becomes non-anonymous briefly, so do consider only running this off-hours<br role=\"presentation\" data-uw-rm-sr=\"\" \/>[\/av_textblock]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Reporting on Anonymous surveys SharePoint enables the creation of anonymous surveys, but how anonymous are they?\u00a0\u00a0 If you want a truly anonymous survey, then you will want to create a new web application that allows anonymous access without authentication.\u00a0 Here\u2019s a\u00a0TechNet article\u00a0with some good guidance on doing that. If you create an anonymous survey in [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":1940,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[26],"tags":[],"class_list":["post-1934","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"_links":{"self":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1934","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/comments?post=1934"}],"version-history":[{"count":1,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1934\/revisions"}],"predecessor-version":[{"id":1942,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1934\/revisions\/1942"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media\/1940"}],"wp:attachment":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media?parent=1934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/categories?post=1934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/tags?post=1934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}