header image

Archive for July, 2015

String startswith method

Posted by: | July 1, 2015 Comments Off on String startswith method |

If you look at the methods available on a string one of them is StartsWith(). It tests if a given string starts with another string   £> ‘frgrughrugu’.StartsWith OverloadDefinitions ——————- bool StartsWith(string value) bool StartsWith(string value, System.StringComparison comparisonType) bool StartsWith(string value, bool ignoreCase, cultureinfo culture)     The first option is the easiest to use […]

under: PowerShell Basics

Domain Admins password last set

Posted by: | July 1, 2015 Comments Off on Domain Admins password last set |

A recent question on the forums asked about getting the date a password was last set and the password never expires status for the domain admins group This is one way of doing it   Get-ADGroupMember -Identity ‘Domain Admins’ | foreach { Get-ADUser -Identity $psitem.samAccountName -Properties PasswordLastSet, PasswordNeverExpires | select Name, PasswordLastSet, PasswordNeverExpires }   […]

under: PowerShell and Active Directory

« Newer Posts