PS script which can search Personally Identifiable Information data in sharePoint site

I would like to write a  PS script which can search for and report on Personally Identifiable Information like card numbers, etc in SharePoint site. I would like to find it in txt as well as xls word .
Velu K

Hi Velu,
Based on your description, my understanding is that you want to get the needed user properties for all the users using PowerShell.
I recommend to use the code below for getting the properties to txt file using PowerShell and you need to grant Full Control permission on the User Profile Service Application for the user who execute the commands:
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.UserProfiles")
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
#change the URL to your root site URL
$site = new-object Microsoft.SharePoint.SPSite("http://sp");
$ServiceContext = Get-SPServiceContext $site
$ProfileManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($ServiceContext)
$AllProfiles = $ProfileManager.GetEnumerator()
#You need to create the text file called UserProfiles in C disk(you can change the name to be what you want and put it in the place where you want )
$file = new-object System.IO.StreamWriter "C:\UserProfiles.txt";
$file.Writeline("DisplayName|Accountname|workEmail");
#get the user properties you want
foreach ($profile in $AllProfiles) {
$DisplayName = $profile.DisplayName
$AccountName = $profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::AccountName].Value
$workEmail = $profile[[Microsoft.Office.Server.UserProfiles.PropertyConstants]::workEmail].Value
$file.Writeline($DisplayName+"|"+$AccountName+"|"+$workEmail);
$file.close();
$site.Dispose()
More references:
http://social.technet.microsoft.com/wiki/contents/articles/19780.sharepoint-2010-export-user-profile-properties-to-a-text-file-using-powershell.aspx
http://blogs.catapultsystems.com/rhutton/archive/2012/10/11/updating-a-user-profile-picture-using-powershell-exception-calling-quote-ctor-quote-with-quote-1-quote-argument.aspx
Thanks,
Victoria
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected].
Victoria Xia
TechNet Community Support

Similar Messages

  • Looking for a Powershell Script which can put the scom servers in maintenance mode

    Looking for a Powershell Script which can put the scom servers in maintenance mode so that SCOM should not send an alert during planned task.
    Rahul

    1. Provide list of servers line-by-line in C:\ServerList.txt, make sure you provide limited no. of servers, do not exceed 20 - 25 per batch
    2. Save the script with suitable name (test.ps1)
    3. Open PowerShell cmd prompt
    4. Script accepts 3 params - TimeInMinutes, Reason and Comment
    **** Please note, this script will work for SCOM 2012 R2
    param([int32]$TimeMin, [string]$Reason, [string]$Comment)
    try
    $api = new-object -comObject 'MOM.ScriptAPI'
    Import-Module operationsmanager
    New-SCOMManagementGroupConnection
    $Servers = Get-Content "C:\ServerList.txt"
    $Time = (Get-Date).Addminutes($TimeMin)
    Foreach ($Server in $Servers)
    #Get Computer instance
    $ComputerClass = Get-SCOMClass -Name Microsoft.Windows.Computer
    $ComputerClassInstance = Get-SCOMClassInstance  -Class $ComputerClass | Where {$_.DisplayName -eq $Server}
    If ($ComputerClassInstance -ne $Null)
    $HealthServiceWatcherClass = Get-SCOMClass -name:Microsoft.SystemCenter.HealthServiceWatcher
    #Get Health Service Watcher Class instance of the server
    $HSWClass = Get-SCOMClass -Name Microsoft.SystemCenter.HealthServiceWatcher
    $HSWClassIns = Get-SCOMClassInstance  -Class $HSWClass | Where {$_.DisplayName -eq $Server}
    #Starting the maintenance mode
    Start-SCOMMaintenanceMode -Instance $HSWClassIns -EndTime $Time -Reason $Reason -Comment $Comment
    Start-SCOMMaintenanceMode -Instance $ComputerClassInstance -EndTime $Time  -Reason $Reason -Comment $Comment
    Write-Host "Health Service Watcher and Agent server "$Server " kept in maintenance mode"  -foregroundcolor "green"
    $api.LogScriptEvent('MaintenanceModeScript.ps1', 200, 0, "$Server kept in maintenance mode for $TimeMin minutes")
    Else
    Write-Host $Server" not found " -foregroundcolor "red"
    $api.LogScriptEvent('MaintenanceModeScript.ps1', 201, 1, "$Server could not be found in domain")
    Catch [system.exception]
    $api.LogScriptEvent('MaintenanceModeScript.ps1', 201, 1, $_.Exception.Message)
    Faizan

  • How much personally-identifiable information do websites see?

    Hi folks,
    I just wanted to ask how much of my personally-identifible information do websites see? As in, if I go over to Disney.com and browse through it, what do their webmasters and operators see?
    I'm fine with websites seeing my IP address, because it's unavoidable. It's one of those things. And I'm fine with people seeing that I'm using Safari and a MacBook Pro. I'm even okay with websites knowing what I searched and what I viewed. However, do they see my login name on my mac? I.e. Joe Bloggs? And do they see my mac name? Or anything personal?
    I'm sorry this is a weird question. But I'm one of those individuals that really gets frustrated when the WWW treats my personal information as a commercial commodity that can be sold and used by big companies. I've had a run-in where my name and postal address was sold to a direct marketing company, and it took ages to get off their list.
    Have a nice day.
    Cheers :-)

    No annonymity once you start using the web. Tracking cookies, location services, cell tower records
    and specially placed tools legal or illegal make you fully visible and information collected if needed.
    Sites  https with lock icon beside the url transmits the data encrypted.
    There is no privacy in practical terms nowadays.
    Very strong passwords and changing it often can help.
    VPN may prevent some intrusion.

  • Create a script that can create entire schema with data when run

    Hi,
    I need to create a script that creates the entire schema on a database when the script is run. the need is that the script should be capable of creating all schema objects with grants and all, including the table data.
    The same objective can be achived through export / import.But we don't want to deliver the dump files instead a script which will be executed on a database created with same database stucture of tablespaces etc.
    I have serched the net but yet to achive the goal.
    Is there any oracle utility / script file that can do this for me ?
    Can Oracle import be used to create the same, the way it is used to create index File ?
    Please suggest !!
    Regards

    You should look at the package dbms_metadata to be able to extract all ddl to recreate a schema. To load the data, you could write scripts that will generate insert statements and spool these to a file (sql generating sql), or you could write scripts that generates a delimited file and use sql loader to load the data into the target system. There are lots of little gotchas in either of these 2 solutions. The biggest 2 right away. 1 - picking a delimiter, 2 - dealing with carriage returns in text data. SQL Developer is able to do some extraction, so before you go writing this stuff yourself, I would check it out to see if it does what you are looking for before you reinvent the wheel.

  • Search text or shape data in SharePoint.

    Is there a way to search information like text or shape data in a Visio-drawing published on a SharePoint-site like you could do when saved as html?
    Staffan Söderholm

    Hi,
    As far as I know, we can search the text from html file on a SharePoint-site. Please see the below article:
    https://technet.microsoft.com/en-us/library/jj219530.aspx
    Then, this issue is more related to the SharePoint search, I recommend you post the question to SharePoint search forum:
    https://social.technet.microsoft.com/Forums/en-US/home?forum=sharepointsearch
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Is there a way I can add be background image to my sharepoint site with look and feel?

    Whenever i add any background image with "look and feel" it stretches the image. I've tried modifying the CSS file (in body and tried .ms-backgroundImage setting "background-size:inherit !important;") to fix it, but it doesn't seem to
    have any effect. I there anyway i can add a background image to the master html or css code and get it to not stretch?
    Thanks
    James T.F

    Hi,
    According to your post, my understanding is that you wanted to add background image to sharepoint site with look and feel.
    We can define the Image Url  in the Composed looks (Site Settings > Web Designer Galleries > Composed looks) to add background.
    However, the image will be stretched to fill the viewport at 100%.
    Though we can override the CSS attributes which would allow the image to repeat, but instead I recommend to go the no CSS route and switched the background to a much larger one that would fill the viewport nicely without looking pixelated.
    More information:
    SharePoint 2013 Branding: A New Approach
    SharePoint 2013's Branding – My first three lessons
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Can we record a script which can download files?

    Hi, I'm trying to record a script to download file at data collector. I'm using Dialog Manager to handle all the dialogs but it keep failing at the dialog which need to click on Save button. I've edit the Dialog Manager with action like [Save]{ENTER}/ {+S}/ {S} but error still occurred.
    Although the script fails when playback but it can run successfully at Navigation Editor and retrieved the content of the file that I want to download. Besides that, the script also running well when uploaded into monitor. I'm wondering if the script can perform download action as when I check the data collector, there is no files downloaded at the selected location. Can someone help on this? Thanks alot.

    Here is what worked for me:
    Add a dialog with these settings:
    Caption: FileDownload*
    Text: *
    Action: [Save]{click}
    Add another dialog with these settings:
    Caption: Save As
    Text: Save &in:
    Action: [Save]{click}
    Let me know if this doesn't work for you. I am using IE 7.
    If you run through Navigation Editor, the e-Load Agent will download the file and discard the contents. The result is that the file gets downloaded and stresses the web server but doesn't cause storage problems on the agent machine.
    -GateCity_QA

  • Which can we prefer while deleting data

    Hi..
    suppose both master data and transaction data were loaded.If we want to
    delete data from both of them (or) either one of them,which one can be
    preffered to delete?..
    It is an interview question..,at what circumstances in real time,deletion of data
    like situations ll happen?..
    plz solve this..
    Thanks & Regards
    sarau

    Hi,
    The order of deletion is:
    Deltion of Transaction Data first.
    Then delete the Master data. Because the master data refernce is used in transaction data. Thats why we need to deleted the Cubes' data first.
    May be this is what he wants to hear from you.
    With rgds,
    Anil Kumar Sharma .P

  • Can Ipad / Android app submit data to Sharepoint 2013

    I really like the flexibility of Building Mobile Apps with Flash Builder and export to Ipad or Android application.
    For a simple inspection process. I like to have 10 inspections points where my form will ask if the inspection point pass or not, basically a simple checkbox. also some text field for comments and finally a picture of the physical point inspected.
    Since I'm going to have 10 questions, will return 10 binary fields and 10 text fields with 10 pictures, which I like to have the picture control to take the picture on the fly.
    At the end of the inpection like to have the option of submit all the data collected for storage and future analysis, in this case will be "Sharepoint 2013".
    I know Sharepoint 2013 have different methods to insert data, [ CSOM, REST, OData / OAuth ]. however I'm not sure if this is possible with ActionScript.
    Can somebody point me in the right direction or if I need something else to achieve this goal ?
    THX Dino.

    Hi Mercury, 
    Thanks for posting your issue, Kindly follow below mentioned steps to solve this issue
    Go to the List Permissions and stop inheriting permissions first
    Clicking the Anonymous Access ribbon button after breaking permissions inheritance
    Now, allow Anonymous users to Add items (edit and delete are optional, but not recommended)
    Now, your anonymous user should be able to add an item to the list
    Also, check out below mentioned URL to know about the fix of this issue
    http://www.codeproject.com/Articles/569965/GrantingplusAnonymousplusAccessplustoplusSharepoin
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • Does anyone have a terminal script that can bind Macs to AD?

    Looking to use terminal to bind our Macs to AD. Is there anyone who has done this process before?
    Thanks for the help!

    Personally, we use Casper Suite and that works well especially since it's a 'set and forget' sort of thing.  But I did find this.  I've used some of these commands and this looks thorough. 
    PLEASE BE SURE TO TEST IN YOUR TEST AD ENVIRONMENT!! 
    #!/bin/sh
    ############################ AD_Bind_ARD ###########################
    # Patrick Gallagher | [email protected]
    # http://macadmincorner.com/bind-to-ad-using-apple-remote-desktop/
    # This is a script that will bind a Mac to AD from ARD.
    # Modified from Mike Bombich's ad-bind-login-tiger.sh script
    # which can be found at http://www.bombich.com/mactips/scripts.html
    # Needs to be modified for your enviornment
    computerid=`/usr/sbin/scutil --get LocalHostName`
    # Standard parameters
    domain="domain.school.edu"               # fully qualified DNS name of Active Directory Domain
    udn="username"               # username of a privileged network user
    password="password"                         # password of a privileged network user
    ou="CN=Computers,DC=domain,DC=school,DC=edu"          # Distinguished name of container for the computer
    # Advanced options
    alldomains="enable"               # 'enable' or 'disable' automatic multi-domain authentication
    localhome="enable"               # 'enable' or 'disable' force home directory to local drive
    protocol="smb"                    # 'afp' or 'smb' change how home is mounted from server
    mobile="enable"               # 'enable' or 'disable' mobile account support for offline logon
    mobileconfirm="disable"          # 'enable' or 'disable' warn the user that a mobile acct will be created
    useuncpath="disable"               # 'enable' or 'disable' use AD SMBHome attribute to determine the home dir
    user_shell="/bin/bash"          # e.g., /bin/bash or "none"
    preferred="-nopreferred"     # Use the specified server for all Directory lookups and authentication
    # (e.g. "-nopreferred" or "-preferred ad.server.edu")
    admingroups="YOURDOMAIN\domain admins"     # These comma-separated AD groups may administer the machine (e.g. "" or "APPLE\mac admins")
    # Login hook setting -- specify the path to a login hook that you want to run instead of this script
    ### End of configuration
    # Activate the AD plugin
    defaults write /Library/Preferences/DirectoryService/DirectoryService "Active Directory" "Active"
    plutil -convert xml1 /Library/Preferences/DirectoryService/DirectoryService.plist
    sleep 5
    # Bind to AD
    dsconfigad -f -a $computerid -domain $domain -u $udn -p "$password" -ou "$ou"
    # Configure advanced AD plugin options
    if [ "$admingroups" = "" ]; then
    dsconfigad -nogroups
    else
    dsconfigad -groups "$admingroups"
    fi
    dsconfigad -alldomains $alldomains -localhome $localhome -protocol $protocol \
    -mobile $mobile -mobileconfirm $mobileconfirm -useuncpath $useuncpath \
    -shell $user_shell $preferred
    # Restart DirectoryService (necessary to reload AD plugin activation settings)
    killall DirectoryService
    # Add the AD node to the search path
    if [ "$alldomains" = "enable" ]; then
    csp="/Active Directory/All Domains"
    else
    csp="/Active Directory/$domain"
    fi
    #dscl /Search -create / SearchPolicy CSPSearchPath
    #dscl /Search -append / CSPSearchPath "/Active Directory/All Domains"
    #dscl /Search/Contacts -create / SearchPolicy CSPSearchPath
    #dscl /Search/Contacts -append / CSPSearchPath "/Active Directory/All Domains"
    # This works in a pinch if the above code does not
    defaults write /Library/Preferences/DirectoryService/SearchNodeConfig "Search Node Custom Path Array" -array "/Active Directory/All Domains"
    defaults write /Library/Preferences/DirectoryService/SearchNodeConfig "Search Policy" -int 3
    defaults write /Library/Preferences/DirectoryService/ContactsNodeConfig "Search Node Custom Path Array" -array "/Active Directory/All Domains"
    defaults write /Library/Preferences/DirectoryService/ContactsNodeConfig "Search Policy" -int 3
    plutil -convert xml1 /Library/Preferences/DirectoryService/SearchNodeConfig.plist

  • Programatically create objects in library which can be imported to stage

    I need to create an object in code which can then be imported to the stage. 
    Specifically it's a circle with an ellipse cut out of it.  The size and position of the ellipse masked out need to be parameterized by sliders, and the size of the circle as a whole is also a parameter which might be dragged out on the stage.
    Does anyone have an example of how to programatically create an object in action script which can be imported to the library which can take parameters (or rather expose some methods) which can be wired to other things in the project like a knob or slider?
    Thanks in advance!
    Michael Grant

    you can use the function below.  call it passing parameters for the circle's absolute x, y, radius and color and passing the ellipses (relative to the circle) x,y,radius x, radius y.  a sprite is returned with the graphics, i think, you want:
    ////////////  sample function call: ///////////////////////////////////////////////
    var c:Sprite = circleMinusEllipse(100,200,50,0xaa0000,-40,-20,40,20);
    addChild(c);
    //////////// nothing below needs to be changed ////////////////////////
    function circleMinusEllipse(cX:Number,cY:Number,r:Number,col:Number,eX:Number,eY:Number,rX:Number, rY:Number):Sprite{
        var c:Sprite = new Sprite();
        c.x = cX;
        c.y = cY;
        with(c.graphics){
            beginFill(col);
            drawCircle(0,0,r);
            drawEllipse(eX,eY,2*rX,2*rY);
            endFill();
        return c;

  • Need a character which can nullify a tab while printing a variable

    My variable has data as  vinod,,reddy,,g
    When, I am passing to script it should print as it is, but it is printing as vinod                     reddy                           g
    This is causing error to read the text as lot of space is coming inbetween...
    I know ,, will act as tab in Script. But need some character which can be placed inbetween the data of ,, so that it gets nullified in sap script while printing and data prints as vinod,,reddy,,g

    declare variable like data: lv_space type char10 value '          '
    pass vinod &lv_space& reddy &lv_space& g.

  • Oracle Backup and Recovery 101: where can I get more information?

    Hey everyone. I'm a pretty new Oracle DBA and backup and recovery is something I want to learn as much about as I can.
    I read a blog about "how to be a good DBA" and it really drove home the importance of backups. I know how important they are, I just want to learn more.
    What I mean is, I understand a lot of the high level concepts. It is pretty much straight forward. What I am looking for is something that really goes down in the internals of what is going on behind the scenes so I know what is going on.
    I thought it would be extremely beneficial for me to learn about user backups. Granted, RMAN is the direction my company is heading to, but right now, we are doing user made backups. My thinking is that if I can get a solid grip and understanding of backup and recovery, user made backups, it will make the transition to RMAN much easier. That way, when I am working in RMAN, issue a command to do backup, I know the equivalent of a user backup and what is going on.
    I hope that makes sense.
    Is there a recommended book that goes over backup and recovery in depth?
    I'd like to learn about all the user-made backup commands that can be executed at the command line (example, putting a tablespace in backup).
    Since backups are essential to the life of a DBA, I thought the more I know, the better off I would be.

    You can always find good information from Oracle document site,
    Oracle® Database Backup and Recovery Basics
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/toc.htm
    Oracle® Database Backup and Recovery Advanced User's Guide
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/toc.htm
    User managed backup is quite different from RMAN backup. For RMAN backup you need to get familiar with the RMAN command syntax and configure.

  • How to get Search and offline Availability properties in SharePoint using powershell with CSOM

    Hi,
    I want to get the information about the SharePoint sites being crawled or not. I tried to get "Search and offline Availability in SharePoint" settings properties but I couldn't get those properties.
    I followed below thread with no luck : http://www.c-sharpcorner.com/uploadfile/anavijai/search-and-offline-availability-in-sharepoint-2010/
    I couldn't find $web.AllowAutomaticASPXPageIndexing property at site level but i can see $list.NoCrawl
    at list level.
    Can any body help me out to get those values?
    Any help would be greatly appreciated.
    Thank you.
    AA.

    Hi,
    Since AllowAutomaticASPXPageIndexing is a member in SPWeb members while not in Web members, we can not use Client Side Object Model with it. If you need to use it in client side, you need to create a web service for it.
    https://msdn.microsoft.com/EN-US/library/microsoft.sharepoint.client.web_members.aspx
    https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb_members.aspx
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to get result from SharePoint site which is on different server.

    We have two SharePoint site on two different server. We want to create search which will search and display content of one one site on other site.
    If this is possible then pls let me know how can I do this. If you have any links/blogs pls share with me.
    Rushikesh_Khadtare

    Hi  ,
    According to your description, my understanding is that you need to create search which will search and display content of one site on other site.
    For your issue, you can deploy a "search center" site in each web app. 
    Any time you perform a search from a search center site, it by default searches all content (using All Content scope) in your index, regardless of web app.
    Take the following steps:
    * Go to  Search Service Application
    * Click Content Sources
    * Select Edit from the Local Office SharePoint Server sites
    * In Start Addresses add the urls of all web applications that you want this content source to crawl
    After a crawl you should now be able to search/find data from all web applications.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

Maybe you are looking for

  • Tracking app or other tool

    Does Apple have an app or another tool to track text content?  I have all other parental controls set up but still looking for this.  Mobile Watchdog does not support iPhones.

  • Mapping of Loan to Vendor Account

    Dear Experts, As per my issue, I have created Vendor Account, mapped it with employee number as well. I have done all the configuration settings. When an employee has single loan, in that case, this works perfectly fine, going to a specific clearing

  • Linksys and ps3

    I have a linksys wrt54gs v8 and two ps3s and i get unable to join game errors when both units are online and playing the same game. I have no problems connecting to the internet or the playstation network but when i go in warhawk and sign one person

  • Safari and Firefox difference...

    Go to this page... http://www.dogpile.com You will see that Safari displays the page fully. All of the pictures/drawings display right. Firefox shows a tiny red dot in place of the "dog" picture. I don't know why and have looked at my settings. All s

  • Are we able to trade 1st generation nanos in for newer ones

    i have a 1 st generation nano are we able to go to an apple store and trade it for a newer one