Sure, Powershell happily supports duck typing as '[]' notation indexes an array.
PS > $username |gm |select-String Substring string Substring(int startIndex), string Substring(int startIndex, int length) Substring() is a string method, just to be pedantic:) jlc From: [email protected] [mailto:[email protected]] On Behalf Of Tony Patton Sent: Friday, August 23, 2013 5:11 AM To: [email protected] Subject: Re: [NTSysADM] PowerShell string manipulation I just tried this and this worked: $username = "pattont" $username[0] This returned "p". Results may vary though. T On 23 August 2013 11:03, James Rankin <[email protected]<mailto:[email protected]>> wrote: Anyone have any ideas how to grab the first character of a string (namely a username) in PowerShell? Plenty of hits on removing the last characters from Google, but nothing useful Cheers, -- James Rankin Technical Consultant (ACA, CCA, MCTS) http://appsensebigot.blogspot.co.uk

