Set-ADUser based on .csv file - empty attributes issue

Hi, after a few months without working with PowerShell my knowledge is slowly fading away but fortunately every time this happened before, I was able to rebuild my knowledge again and now it is the same story. However I want to optimize my simple
code which populates three AD user object attributes: manager, officephone and fax with values stored in .csv file. Everything works well, but my code looks not so good in my opinion. Is there any more elegant solution?
$AddressBook = Import-CSV -Path D:\AddressBookFinal.csv
foreach($Employee in $AddressBook)
     if([string]::IsNullOrEmpty($Employee.ManagerUserName)) {
              Set-ADUser -Identity $Employee.EmployeeUserName -Manager $null
    } else {
              Set-ADUser -Identity $Employee.EmployeeUserName -Manager $Employee.ManagerUserName
    <#similar code here for checking value of OfficePhone and Fax attributes and populating             AD attributes depending on if attribute value in .csv file is empty or not#> 

Hi BoxiKG,
If there is any other question regarding this issue, please feel free to reply this post directly so we will be notified to follow it up.
If you have any feedback on our support, please click here.
Best Regards,
Anna Wang
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 Support, contact [email protected]

Similar Messages

  • Reading .csv Files & Empty List Elements

    I have an application allowing users to upload .csv files for
    import into a database.
    The issue is however, that in some cases every column in the
    csv file will be populated, and in others, not.
    As ColdFusion ignores empty list elements I cannot accurately
    import data based on it's column numbers.
    I'm curious how others get around this issue.

    ckbentdesigns wrote:
    > As ColdFusion ignores empty list elements
    Yes, most list functions ignore empty elements. If you are
    using CF8, try the listToArray function. It has a new attribute
    includeEmptyElements.
    Otherwise, there are several solutions. I listed a few of
    them in this thread. Though there are others. You should google
    something like:
    ColdFusion csv Files Empty List Elements to see other
    options and the +/- of each.
    http://www.tek-tips.com/viewthread.cfm?qid=1490791&page=1

  • Get-ADUser SamAccount from CSV file does not work.

    So I'm trying to get HomeDirectory + SamAccountName using Get-ADUser from an imported csv file called $csvFile
    $GetUserInfo = Get-ADUser (Get-ADUser -Filter { displayName -eq $csvFile[$index].DisplayName}).SamAccountName -Properties SamAccountName,HomeDirectory
    It gives me an error. 
    Get-ADUser : Invalid type 'System.Object[]'.
    Parameter name: displayName
    At line:1 char:28
    + $GetInfoUser = Get-ADUser (Get-ADUser -Filter { displayName -eq $csvFile[5].Disp ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-ADUser], ArgumentException
    + FullyQualifiedErrorId : ActiveDirectoryCmdlet:System.ArgumentException,Microsoft.ActiveDirectory.Management.Commands.GetADUser
    However if I do like this 
    $DisplayName = $csvFile[$index].DisplayName
    and replace $DisplayName to the filter like this, it works flawless and I get HomeDirectory and the SamAccountName
    (Get-ADUser -Filter { displayName -eq $DisplayName }).SamA...
    Any ideas or improvements

    Still produces the same error. I'm running 4.0
    How about this?
    Import-Csv C:\Temp\user.csv | % {
    $displayname = $_.displayname;
    get-aduser -filter { displayname -eq $displayname } | Select SamAccountname , HomeDirectory
    The below was my CSV format
    DisplayName
    Chendrayan Venkatesan
    Ramesh Venkatesan
    Regards Chen V [MCTS SharePoint 2010]

  • Set Folder Permission with CSV File

    I currently have a batch file that I use to set the folder permission on a users folder.  The batch file of course requires me to manually set two variables.  I'd like to have a master csv file containing this info and a powershell script to allow
    me to set these permission much more quickly.  Here's my current batch file:
    Set User=123A
    Set Folder=123
    icacls C:\Data\%folder% /grant %user%:(OI)(CI)F
    My csv file would appear as 123A,123
    I did do a search and found a few posts on this subject, but couldn't wrap my head around how to modify them to fit my needs.
    Kevin

    FOR /F "eol=; tokens=1,2* delims=, " %%i in (myfile.txt) do icacls C:\Data\%%j /grant %%i:(OI)(CI)F
    ¯\_(ツ)_/¯

  • Data set created out of csv file: columns not recognized, too many rows

    After uploading a csv file I got out of the OPP the columns don't get recognized in the dataset viewer. Perhaps this happens because the delimiter is a semicolon instead of a comma? Unfortunately, I have no influence how the data gets exported out of the OPP. Is there any option to configure which delimiter to recognize, like it's possible in excel?
    Further, is it possible to configure from which row on the data should be taken into account, similar to excel? With the csv file I get out of the OPP, the data only starts with row 7, while row 6 has the headings.

    After uploading a csv file I got out of the OPP the columns don't get recognized in the dataset viewer. Perhaps this happens because the delimiter is a semicolon instead of a comma? Unfortunately, I have no influence how the data gets exported out of the OPP. Is there any option to configure which delimiter to recognize, like it's possible in excel?
    The delimiter cannot be configured. Comma is the delimiter. I would suggest that you open this file in text editor then replace semicolon with comma. After that you can reupload your dataset.
    Further, is it possible to configure from which row on the data should be taken into account, similar to excel? With the csv file I get out of the OPP, the data only starts with row 7, while row 6 has the headings.
    This is not configurable as well.

  • Csv file load related issue: giving short dump

    Hi Experts,
    In BPS I have created a load csv planning function which load data from csv file. While I am executing the function it is showing successful message 'dta records generated' but ehen I press the save button it is giving a dump 'Exception condition "ILLEGAL_INPUT" raised.'.The same planning level and package is working fine with manual planning. The load function modules are also working fine for some other plannig levels. Please suggest what could be the reason for this exception.
    Thanks,
    Saikat.

    I had  same problem.
    It s something wrong in the CSV files. What I mean is that sometimes it went something like a ',' or a '.' or other wrong characters in some characteristics that cannot accept like numbers or whatever, or something that to you looks a blank but for SAP is some special character.
    The way to find is very boring ! Be sure first of all that when you load you do not try to save also the HEADER with Titles of the CSV file. Anyway this was not my problem.
    To me happened as follow last time.
    " For one rcharacteristic it accept values '1'  '2'  '3' etc...until '9'. So just numbers.  In one of the record of the files it was written '1.' So just the '.' made this big problem. "
    To solve this last time, I just generated again the file and without to change the ABAP code it went ok.
    Anyway try to check again from benning all your levels and the ABAP code.
    I know what u mean, this error cause big headaches, I lost 3 hours to solve.
    Hope you are lucky.

  • Powershell - Bulk Set-ADUser attributes via a CSV file

    I am attempting to do a Bulk replace of AD User account attributes via a CSV file.  Each line in this script works except the part of Set-ADUser where I enter -Replace $attribs. I'm not sure how to code this
    part.
    <#
    The .csv file should have the following headers (first line)
    GroupName,Status,Approver1,Approver2,Owner
    #>
    #Import CSV
    $csv = @()
    $csv = Import-Csv -Path "C:\TempAdd_Grp_Attrib.csv"
    #Loop through all items in the CSV
    ForEach ($item In $csv)
    $gname = $item.GroupName
    $attribs = @{'extensionAttribute2'=$item.Status; 'extensionAttribute3'=$item.Approver1; 'extensionAttribute4'=$item.Approver2; 'managedBy'=$item.Owner}
    Set-ADGroup -Identity $gname #-Replace $attribs
    mamadukes

    Yes. I am attempting to update the AD Group extension attributes.
    The code below works, but I know I can streamline this if I use the INSTANCE, which I am having an issue with (Set-ADGroup -Instance $Update)
    Import-Module ActiveDirectory
    <#
    The .csv file should have the following headers (first line)
    GroupName,Status,Approver1,Approver2,Owner
    #>
    #Import CSV
    $date = get-date -Format "MMddyyyymm"
    $csv = @()
    $csv = Import-Csv -Path "C:\Temp\Add_Grp_Attrib2.csv"
    #Loop through all items in the CSV
    ForEach ($item In $csv)
    $Update=(Get-ADGroup $item.GroupName -Properties extensionAttribute2,extensionAttribute3,extensionAttribute4,ManagedBy);
    $Update."extensionAttribute2"=$item.Status
    $Update."extensionAttribute3"=$item.Approver1
    $Update."extensionAttribute4"=$item.Approver2
    # Set-ADGroup -instance $Update
    Set-ADGroup -Identity $item.groupName -ManagedBy $item.Owner
    Get-ADGroup $item.GroupName -Properties extensionAttribute2,extensionAttribute3,extensionAttribute4,ManagedBy | select name,extensionAttribute2,extensionAttribute3,extensionAttribute4,ManagedBy | Export-Csv "C:\temp\Add_Grp_Attrib_Updates_$date.csv" -NoTypeInformation
    mamadukes

  • Script to to update users attribute based on EmployeeID Value from CSV file

    Hello, 
    i am trying to build script that read the data from CSV file, the only data exist on this file is the EmployeeID.
    so i need to read the EmployeeID and for each employeeID exist in this sheet in need to disable that user and  change the Description to "Disabled based on the HR Request"
    below script is not working for me any help plz 
    $path = "D:\Private\sample-data.csv"
    $LIST=IMPORT-CSV $path
    $UseremployeeID = $USER.employeeID
    FOREACH ($Person in $LIST) {
    $UserID = Get-ADUser -Filter {employeeID -eq ($LIST.Row[1])}
    foreach ($USER in $UserID){
    Set-ADUser -Identity $User -Description "Disabled based on the HR Request" -Enabled $false

    I managed to know the reason
    you should add -properties EmployeeID  to your code
    <snip>
    Hi,
    That's not necessary. The filtering is done serverside, so you don't need to request that it be returned.
    Example:
    Get-ADUser -Filter "Title -eq 'Some Title In Your Company'"
    Title isn't a default property, but the command above works just fine.
    Don't retire TechNet! -
    (Don't give up yet - 12,575+ strong and growing)

  • Need to create new users in Office 365 with custom attributes from a csv file

    I am exporting users from an active directory environment and then deleting them from AD. They are Alumni and will no longer be in AD.
    I have a csv file with the following fields that I need to use to create new Alumni email boxes in Office 365 for. I need the CustomAttributes because my Dynamic Distribution Groups use them. I am fairly new to PowerShell and have been unable to get this
    to work. I suspect I may have to split it into two parts, but am not sure how to proceed. Any assistance would be appreciated. I was directed here from the Office 365 community.
    Import-Csv -Path c:\CSVfiles\CreateAlumni.csv | ForEach-Object {
       New-MsolUser -FirstName $_.FirstName -LastName $_.LastName
       -UserPrincipalName $_.UserPrincipalName
       -DisplayName "$($_.FirstName) $($_.LastName)"
       -Password $_.Password
       -CustomAttribute1 $_.CustomAttribute1
       -CustomAttribute3 $_.CustomAttribute3
       -CustomAttribute10 $_.CustomAttribute10
       -CustomAttribute11 $_.CustomAttribute11
       -CustomAttribute12 $_.CustomAttribute12
       -LicenseAssignment 'domaincom:EXCHANGESTANDARD_ALUMNI'
       -UsageLocation US

    Ok, it wasn't stopping after 2 iterations. What I was seeing was 2 failures. The first was the Get-Mailbox command and the second was when it tried to assign attributes. For some reason it is not looping when it fails. It just goes on and tries to assign
    the Custom Attributes. I added writes in to tell me what was happening.
    ### Check if mailbox is provisioned yet
    Write-Host "Checking if mailbox is provisioned yet..." -foregroundcolor yellow
    $found = $false
    $count = 0
    Do {
    try {
    Get-Mailbox -Identity $_.UserName -ErrorAction Stop
    $found = $true
    Write-Output 'Mailbox found. Details:'
    Get-Mailbox -Identity $_.UserName
    } catch {
    Write-Output 'Sleeping'
    $count++
    Start-Sleep -Seconds 5
    If ($count -ge 12) {
    Write-Output 'Mailbox not found. Quitting.'
    $found = $true
    } Until ($found)
    Write-Host "Adding Custom Attributes to User" -foregroundcolor yellow
    Set-Mailbox -Identity $_.UserName -CustomAttribute1 $_.CustomAttribute1 -CustomAttribute3 $_.CustomAttribute3 -CustomAttribute10 $_.CustomAttribute10 -CustomAttribute11 $_.CustomAttribute11 -CustomAttribute12 $_.CustomAttribute12
    Write-Output "User has been Provisioned in Office 365!" -foregroundcolor yellow
    Checking if mailbox is provisioned yet...
    The operation couldn't be performed because object 'Joe.Cool2003' couldn't be found on 'CO1PR07A002DC01.NAMPR07A002.prod.outlook.com'.
        + CategoryInfo         
    : NotSpecified: (:) [Get-Mailbox], ManagementObjectNotFoundException
        + FullyQualifiedErrorId : [Server=CO1PR07MB125,RequestId=e1aabda1-01e4-4f68-984e-e20be0975242,TimeStamp=5/22/2014 4:23:59 AM] [FailureCategory=Cmdlet-ManagementObj
       ectNotFoundException] 2788FB48,Microsoft.Exchange.Management.RecipientTasks.GetMailbox
        + PSComputerName        : pod51038psh.outlook.com
    Mailbox found. Details:
    The operation couldn't be performed because object 'Joe.Cool2003' couldn't be found on 'CO1PR07A002DC01.NAMPR07A002.prod.outlook.com'.
        + CategoryInfo         
    : NotSpecified: (:) [Get-Mailbox], ManagementObjectNotFoundException
        + FullyQualifiedErrorId : [Server=CO1PR07MB125,RequestId=16a8a2bc-333a-455c-8504-e0b99c44c334,TimeStamp=5/22/2014 4:24:00 AM] [FailureCategory=Cmdlet-ManagementObj
       ectNotFoundException] 2788FB48,Microsoft.Exchange.Management.RecipientTasks.GetMailbox
        + PSComputerName       
    : pod51038psh.outlook.com
    Adding Custom Attributes to User
    The operation couldn't be performed because object 'Joe.Cool2003' couldn't be found on 'CO1PR07A002DC01.NAMPR07A002.prod.outlook.com'.
        + CategoryInfo         
    : NotSpecified: (:) [Set-Mailbox], ManagementObjectNotFoundException
        + FullyQualifiedErrorId : [Server=CO1PR07MB125,RequestId=8319d220-b9dd-492f-8182-5083cf56e58b,TimeStamp=5/22/2014 4:24:00 AM] [FailureCategory=Cmdlet-ManagementObj
       ectNotFoundException] C7844A24,Microsoft.Exchange.Management.RecipientTasks.SetMailbox
        + PSComputerName       
    : pod51038psh.outlook.com
    User has been Provisioned in Office 365!
    Of course the user has been provisioned, but the CustomAttributes have not been assigned. :(

  • How to create a csv file with NCS attributes?

    Hi
    i installed Cisco Prime NCS and trying to perform bulk update of device credentials with csv file.
    How to create a csv file with all required attributes?
    This is part of NCS online help talking about this topic:
    Bulk Update Devices—To update the device credentials in a bulk, select Bulk Update Devices from the Select a command drop-down list. The Bulk Update Devices page appears.You can choose a CSV file.
    Note        The CSV file contains a list of devices to be updated, one device per line. Each line is a comma separated list of device attributes. The first line describes the attributes included. The IP address attribute is mandatory.
    Bellow is test csv file i created but does not work:
    10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    The error i am getting while importing this file:
    Missing mandatory field [ip_address] on header line:10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    Assistance appreciated.

    It looks like the IP address field is incorrectly set.,
    It should be as follows
    {Device IP},{Device Subnet Mask}, etc etc
    so a practical example of the aboove could be (i dont know if this is completely correct after the IP address / Subnet Mask)
    10.64.160.31,255.255.255.0,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    below is a link to the documentation
    http://www.cisco.com/en/US/docs/wireless/ncs/1.0/configuration/guide/ctrlcfg.html#wp1840245
    HTH
    Darren

  • Populate IP Phone field in AD based on entries in a csv file

    Hi,
    Is there a way to populate the IP Phone field in AD based on a csv?
    I tried the following link but no luck: http://en.community.dell.com/techcenter/powergui/f/4834/t/19569423
    Thanks in advance,
    Johnross

    Dear gregoryg72,
    Thanks for the quick reply. I get the below error:
    Set-Aduser : Cannot find an object with identity: '*username*' under: 'DC=*domain*,DC=com'.
    At C:\extensions.ps1:5 char:1
    + Set-Aduser -identity  $_.username -Add @{ipPhone=$_.ipphone}
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (*domain*\*username*:ADUser) [Set-ADUser], ADIdentityNotFoundException
        + FullyQualifiedErrorId : ActiveDirectoryCmdlet:Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException,Microsoft.ActiveDirectory.Management.Commands.SetADUser
    I have tried with the username, full email address (which is used as a login), domain\username, nothing seems to do the trick. Any idea what could be wrong? Just to let you know I have manually updated the text in the asterix to omit domain name and username.
    Thanks in advance,
    Johnross

  • PowerShell - Bulk-New-ADUser Creation via a csv file

    This script creates bulk AD users via a csv file. The script creates & configures the user accounts correctly even though the following error message appears. How can I correct this?
    Set-Locaiton : Cannot find path 'AD:Mydomain,OU=MyDomain,DC=My,DC=Domain,DC=org' because it does not exist.
    Import-Module ActiveDirectory
    $csv = Import-CSV -Path "C:\Temp\CreateUsers.csv"
    cd AD:
    set-location -path "OU=MyDomain,DC=My,DC=Domain,DC=org" -PassThru
    foreach($Item in $csv){
    $newUserID=@{
    Name=$item.userID
    Description=$item.description
    GivenName=$item.UserID
    surName=$item.UserID
    DisplayName=$item.UserID
    UserPrincipalName=$item.UserID + "@MyDomain.org"
    EmployeeID=$item.Owner
    ScriptPath="login.cmd"
    Try{
    New-ADUser @newUserID -ErrorAction Stop -AccountPassword (ConvertTo-SecureString $Item.Password -AsPlainText -Force) -PassThru
    Enable-ADAccount -Identity $item.userID
    Set-ADUser -Identity $item.userID -ChangePasswordAtLogon $true
    Write-Host "UserID $($item.UserID) created!" -ForegroundColor green
    Catch{
    Write-Host "There was a problem creating UserID $($item.UserID). The account was not created!" -ForegroundColor Red
    set-location -path "c:\temp"
    mamadukes

    Slight variation, populated from the AdventureWorks SQL database rather than a CSV
    Import-Module "SQLPS" -DisableNameChecking
    New-PSDrive -Name AWDB -PSProvider SQLServer -ROOT SQLSERVER:\sql\localhost\default\databases\adventureworks2012
    Set-Location AWDB:\Tables
    $SQLText = "SELECT e.BusinessEntityID, p.Title, p.FirstName, p.MiddleName, p.LastName, p.Suffix, "+
    "e.JobTitle, d.Name AS Department, d.GroupName, edh.StartDate, e.LoginID"+
    " FROM HumanResources.Employee AS e"+
    " INNER JOIN Person.Person AS p ON p.BusinessEntityID = e.BusinessEntityID"+
    " INNER JOIN HumanResources.EmployeeDepartmentHistory AS edh ON e.BusinessEntityID = edh.BusinessEntityID"+
    " INNER JOIN HumanResources.Department AS d ON edh.DepartmentID = d.DepartmentID"+
    " WHERE (edh.EndDate IS NULL)"+
    " AND (p.FirstName ='Brian')"
    $Query = Invoke-SQLCmd -Query $SQLText
    $Password = "P@assword1"
    foreach($Item in $Query)
    $LoginID=$Item.LoginID
    $LoginID="CORP\"+($LoginID).Substring(16)
    $newUserID=@{
    Name=$item.FirstName+$Item.LastName
    Description="This is a test of a bulk user add"
    GivenName=$item.FirstName
    Surname=$item.LastName
    DisplayName=$item.FirstName+" "+$Item.LastName
    UserPrincipalName="$($item.FirstName+"."+$Item.LastName)@corp.contoso.com"
    EmployeeID=$item.BusinessEntityID
    ScriptPath='login.cmd'
    Company="Contoso"
    Department=$Item.Department
    EmailAddress="$($item.FirstName+"."+$Item.LastName)@corp.contoso.com"
    Title=$Item.JobTitle
    $TargetOU="OU="+$item.Department+",DC=corp,DC=contoso,DC=com"
    Try{
    $newUserID
    New-ADUser @newUserID -Path $TargetOU -ErrorAction Stop -AccountPassword (ConvertTo-SecureString $Password -AsPlainText -Force) -Passthru
    Enable-ADAccount -Identity $newUserID.Name
    Set-ADUser -Identity $newUserID.Name -ChangePasswordAtLogon $true
    Write-Host "UserID $($newUserID.Name) created!" -ForegroundColor green
    Catch{
    Write-Host "There was a problem creating UserID $($item.UserID). The account was not created!" -ForegroundColor Red
    No need to be on the PSDrive AD:, the OU can be specified in the Path parameter in the New-ADUser.
    This was done on a member server with SQL Server (not a domain controller).
    Thanks for your help

  • How to get Document Set property values in a SharePoint library in to a CSV file using Powershell

    Hi,
    How to get Document Set property values in a SharePoint library into a CSV file using Powershell?
    Any help would be greatly appreciated.
    Thank you.
    AA.

    Hi,
    According to your description, my understanding is that you want to you want to get document set property value in a SharePoint library and then export into a CSV file using PowerShell.
    I suggest you can get the document sets properties like the PowerShell Command below:
    [system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint")
    $siteurl="http://sp2013sps/sites/test"
    $listname="Documents"
    $mysite=new-object microsoft.sharepoint.spsite($siteurl)
    $myweb=$mysite.openweb()
    $list=$myweb.lists[$listname]
    foreach($item in $list.items)
    if($item.contenttype.name -eq "Document Set")
    if($item.folder.itemcount -eq 0)
    write-host $item.title
    Then you can use Export-Csv PowerShell Command to export to a CSV file.
    More information:
    Powershell for document sets
    How to export data to CSV in PowerShell?
    Using the Export-Csv Cmdlet
    Thanks
    Best Regards
    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]

  • Download a UNIX based CGI page into a CSV file using Powershell

    Hello,
    I have been struggling to get a powershell script to work.
    I have a web-based page which ends in .cgi and I want to copy the text from that page to a CSV file.
    Normally the below script works for .html or .aspx types of pages but this time I have been getting the 'The remote server returned an error: (401) Unauthorized' page. I think the error is because the page is Unix based and for some reason I am not
    able to automate the authentication process.
    Below is the Powershell script I have been using. I have already created the securestring for my password and saved in a temp folder.
    $wc=new-object system.net.webclient
    $password = get-content 'C:\temp\Scripts\SecureString.txt' | convertto-securestring
    $wc.Credentials = new-object -typename System.Management.Automation.PSCredential -argumentlist "Domain\username", $password
    $wc.downloadfile("https://website.domain.com/cgi-bin/text_status_csv.cgi", "C:\temp\Scripts\output.csv")
    Currently I am able to successfully copy the data from the page over if I use
    $wc.Credentials = Get-Credential
    And then type in the username and password manually. I could really use some help to get this automated.
    Thanks in advance for your help

    A little searching and you will find hundreds of examples.
    https://www.google.com/#newwindow=1&q=powershell+persist+credentials
    ¯\_(ツ)_/¯

  • Set default password for all users including csv file

    I would like to set the default password for all users
    including the ones imported in the csv file?
    Also now the default passwrd in set to the email address. How
    do i change that setting to the "login" setting in the csv file so
    those users can loin with that password?
    Kinda the same question but do yuo get the idea?
    Thank you,
    Chip

    You could download and install RCDefaultApp 2.1 for all users: check the Read Me and then test it on something to see if it accomplishes what you want.
    http://www.rubicode.com/Software/RCDefaultApp/

Maybe you are looking for