PowerShell: Search User Accounts in Active Directory


Active Directory Module has many cmdlets to process many AD related tasks. BUT we don’t have simple search cmdlet. I had a requirement to check a list of users in AD to see if they exist or not. Get-ADUser doesn’t cut it for my requirement. If a user doesn’t exist, Get-ADUser errors out. So I … Continue reading PowerShell: Search User Accounts in Active Directory

How to Create a bootable Windows 2012 R2 USB Disk? (applies to Windows 8.1 also)


Pre-requisites: 7-Zip software (Download it from here: http://7-zip.org/), Windows 2012 (R2) ISO (or Windows 8.1 ISO), 8GB or more USB disk Open Command Prompt in elevated mode (Run as Administrator) Type diskpart and press Enter Type list disk and press Enter. Note the list of existing disks. Insert the USB Disk Type list disk and … Continue reading How to Create a bootable Windows 2012 R2 USB Disk? (applies to Windows 8.1 also)

How to Create a bootable Windows 2012 R2 USB Disk? (applies to Windows 8.1 also)


Pre-requisites: 7-Zip software (Download it from here: http://7-zip.org/), Windows 2012 (R2) ISO (or Windows 8.1 ISO), 8GB or more USB disk Open Command Prompt in elevated mode (Run as Administrator) Type diskpart and press Enter Type list disk and press Enter. Note the list of existing disks. Insert the USB Disk Type list disk and … Continue reading How to Create a bootable Windows 2012 R2 USB Disk? (applies to Windows 8.1 also)

Active Directory: Bulk User Password Reset by PowerShell


If you need to reset password for bulk number of user accounts, the following PowerShell scripts is for you. This first script requires an file with usernames listed one per line. Check the UserList.txt file location in this file. Change your favorite password in ConvertTo-SecureString cmdlet in this script. Then you are good go. ## … Continue reading Active Directory: Bulk User Password Reset by PowerShell

LastLogonTimeStamp: How to parse the 18 digit number in PowerShell?


This command generates the following results: PS H:\> Get-ADUser JohnD -Properties LastLogonTimeStamp | select Name,LastLogonTimeStamp | fl Name               : John DoeLastLogonTimeStamp : 130364862459391289 If you are wondering how to parse the 18 digit number of LastLogonTimeStamp property value. This LastLogonTimeStamp is expressed using Windows File Time. A Windows file time is a 64-bit value that … Continue reading LastLogonTimeStamp: How to parse the 18 digit number in PowerShell?

PowerShell 4.0: “Get-ADUser : One or more properties are invalid”


This applies to Get-ADComputer cmdlet too. When I try to get all properties of an AD account like Get-ADUser JohnDoe –Properties * it gives following error. Get-ADUser : One or more properties are invalid. Parameter name: msDS-AssignedAuthNPolicy It used to work in older PowerShell versions (Windows 8 or Windows 7). Now my scripts are all … Continue reading PowerShell 4.0: “Get-ADUser : One or more properties are invalid”

WebDAV: Increasing Maximum File Size Limit in Windows Server


Windows (IIS) server based WebDAV server has "laughable" file size limit for download or uploads to/from the server. It turn out to be the restriction is on the client side (Windows). Microsoft says the reason for this restriction is, This issue occurs because a security change that was introduced in Windows XP SP2 affects the Web … Continue reading WebDAV: Increasing Maximum File Size Limit in Windows Server

Citrix/RDS: Publish Internet Explorer without Address Bar


Publishing IE for a web application without address bar is easier than you think. Simply publish the following VBScript or PowerShell script to launch IE without address bar and go to specific intranet website. Copy either one of the script into Notepad and save as LaunchIE.vbs for vbscript OR LaunchIE.PS1 for PowerShell. Change the website … Continue reading Citrix/RDS: Publish Internet Explorer without Address Bar

RDS: Trusting the certificate used for publishing by GPO


When you run a published RDS RemoteApp and you are getting this following warning dialog box, that means the certificate used to publish the RemoteApp is not in trusted by the local computer. “A website wants to run a RemoteApp program. Make sure that you trust the publisher before you connect to run the program.” … Continue reading RDS: Trusting the certificate used for publishing by GPO