Skip to main content

Posts

Showing posts from September, 2016

Windows 10: “Run as a different user” option is missing

Hi All, you may have already noticed that when you right click on any application on Windows 10 PC, you can see “Run as Administrator” option. But “Run as different user” option is missing. To get this option, you’ll make a make a change in registry.   Note :  Please backup registry and make a system restore point before making changes to Registry. Click on  Start . Type  Regedit  and press  Enter  key. In Registry Editor, navigate to HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer        If you do not find this key, right click on Windows key and select new key. Rename it to Explorer . Now, in the right side pane, right click and add DWORD value ShowRunasDifferentuserinStart Right click on ShowRunasDifferentuserinStart and click on Modify… Change its value to 1 and click on OK . Close Registry Editor and reboot PC. Once you restart your PC, you can find Run as different user option is available when you right click on any application. Hope you f

PowerShell Script: Update AD attributes using CSV

Hi All, in this post I am going to share information on how can you update an attribute(s) in AD for multiple objects. In this post, I am using a CSV file that contains users’ First Name, Last Name, their login name and Employee ID. I wanted to update Employee ID for all the users listed in CSV file. To achieve this, I have complied a PowerShell script that uses CSV file and update AD attributes for multiple users. CSV file: I saved CSV file in C:\ADTest.CSV . I ran following PowerShell script as admin. This script import CSV data, updates EmployeeID data for each login name (sAMAccountName) listed in CSV file. #Import Active Directory module Import-Module ActiveDirectory #Import CSV file $Obj = Import-Csv "C:\ADTest.csv" foreach ( $Usr in $Obj ) { Get-ADUser -Filter "sAMAccountName -eq ' $( $u . sAMAccountName) '" -properties * | set-aduser -replace @{employeeID = " $( $u . employeeID) " } -