Skip to main content

Posts

PowerShell command to export a list of domain users from AD group to a CSV file

Here I go with another post on PowerShell. This time, I would like to share a PowerShell command that will help you to export list of users of particular AD (Active Directory) group to a CSV file. Run PowerShell and type following commands: # This will import ActiveDirectory module Import-Module ActiveDirectory # This command will export list of users from GroupName to a CSV file Get-ADGroupMember -Identity "GroupName" -server "TestDomain" -recursive | get-aduser -Properties mail | select name , samaccountname | export-csv -path c:\Script\report.csv -NoTypeInformation In above command, replace GroupName with the Group you want to retrieve members list. Type your domain name in place of TestDomain . Once you run above command, it will create a CSV file “ Report.CSV ” and save it in C:\Script folder. I hope you find this post very useful. Disclaimer: www.TechieTalks.co.uk does not conceal the possibility of error and shortc

PowerShell Script: Find out free disk space from multiple servers

Hi All, this is my very first post on PowerShell Script. Today, I am going to share a script that you can use to find out free disk space from multiple servers. You will have to create a Text file and a PowerShell script to accomplish this. Let’s begin by creating a Text file. I have setup a folder on my C: Drive called PS_Script (C:\ PS_Script). I created a Text file, ServerNames.txt, and saved it in C:\PS_Script folder. Use following code to create a PowerShell script and save it as DiskReport.PS1. #Get Current date $currdate = ( Get-Date ) . tostring( "dd-MM-yyyy" ) #Set path for output file $report = "C:\PS_Script\" + "DiskSpaceReport_" + " $Currdate .html" #Run command to get free disk space from multiple servers and export output to HTML file Get-WmiObject Win32_LogicalDisk -filter "DriveType=3" -computer ( Get-Content C:\PS_Script\ServerNames.txt ) | Select SystemName , DeviceID , V

Changing password while using Remote Desktop Connection

Hi All, I know it’s been a long a time since I have written an article. Today I came across a question where user wanted to change his/her password while they are connected to a Server remotely via Microsoft Remote Desktop Connection. Generally, you press CTRL+ALT+Del , you get  the following choices that includes Change a password… option. This works perfectly fine if you are logged in locally and wants to change password. But if you are logged on to PC remotely using Remote Desktop  connection and press CTRL+ALT+DEL from keyboard, it will apply command to your local PC instead of remote PC. There are two ways to change password using Remote Desktop connections.      Press CTRL+ALT+ END from your keyboard while you are logged in to Remote PC. You should get following options:     Alternatively, press Win +R key in your Remote desktop connection. Type OSK to launch OnScreen Keyboard. Press CTL+ALT from your keyboard and use mouse pointer to click on DEL but

Virtual USB port is missing on Windows 7

Hi All, it has been a long time since I have posted last blog. I was away for a while during Christmas time. Today, I am going to share information about how to get virtual USB port in drop down list while installing local printer (USB) on Windows 7, if it’s not available by default. I followed below steps to add virtual USB port to add USB printer to Windows 7 PC.           Click on Start . Go to Devices and Printers .           Click on Add Printer .           Select Add a local Printer           In Choose a printer port box, select Create a new port option.           From the drop down list, choose Local port and click on Next button.           Port Name dialog box will appear. Type port name USB001 , click on OK           In the step, choose appropriate printer driver from list or provide a driver disk to complete printer driver installation process. I hope you may find this very useful. Disclaimer: www.TechieTalks.co.uk does not conceal the possibility of

Short URL for your links

Day by days, users are using various form of services like Facebook, Twitter, WhatsApp and Viber, etc… to communicate with others and send/receive messages. Some of these services allow users to type only limited number of characters in single message. Hence, if you would like to a link which has long URL, you will need to shorten your URL in such a way that it still directs users to correct page on Internet.  You can achieve this by a method call URL shortening, it is a unique way to convert your long URL in to shorter length and still directs user to correct page. For an example, http://goo.gl/1uSLM0 is shorted URL for our blogs’ main page: http://blog.techietalks.co.uk . You can create a separate short link for each of your webpages or blogs. The main advantage of a short link is that it can be easily communicated and typed without any error. Users don’t need to change their current configuration or possess in-depth technical knowledge. There are various sites who off

User account locks out frequently

One of my colleagues recently changed his password. Since then, his domain account keeps locking out frequently even though he enters correct password. He asked me to investigate why does this happen? There are multiple reasons, why domain account locks out frequently. First of all, I suggest you to find out when user’s account got locked and on what Domain Controller (DC). If user logs on to more than 1 PC, it may be possible that one of the PC is still using expired password. You can use Lockout status tool offered by Microsoft. It’s free tool, CLICK HERE to download it. Using this tool, you can find out that account is locked on any particular DC. Once you’ve identified correct DC, check the event log of that DC to locate the PC name. If user doesn’t log on to any other PC, log in to his/her PC locally or remotely. Try to locate any services or schedule task running using user’s credential. You will have to restart services or schedule task using their current login detai

Fixed: HTC One M8 USB driver doesn’t recognized by Windows 10

Hi friends, recently I upgraded my Windows 7 OS to Windows 10 on my laptop. Everything was working fine until I plugged my HTC One M8 (Android) phone to laptop using USB cable. A message box appeared stating that it could not detect the USB device. I never had any problem when I was using Windows 7. I used to plug my phone to PC using USB cable and access phone storage as USB drive. I typed my query in google and most of the articles suggested that I should installed HTC Sync Manager and then connect my phone. Well, I installed the required application but it did not resolve the issue. Hence, I removed it. This is my 3 rd HTC phone and I started to find out how I can enable USB debugging mode on my phone. This option is hidden by default. To enable this option, follow these steps:  Go to Settings \ About Select Software Information Click on More  option Now, tap on Build number  option six times in a row. A message will be shown saying “ You are now a developer! ” Go