Quick Powershell ShortCut

Shortcut If you are using the where command Get-Mailbox * | Where-Object {$_.EmailAddress -like “*something.com”} you can use a question mark Get-Mailbox * | ? {$_.EmailAddress -like “*something.com”} Some others I often use: Format-List = FL Format-Table = FT Get-Item = gi Export-CSV = epcsv Import-PSSession = ipsn Add-PsSnapIn =… Continue reading

LetsEncrypt – Errors

The other day I went to update my certificates and was receiving an error running the letsencrypt script to update. The error was Error: couldn’t get currently installed version for /root/.local/share/letsencrypt/bin/letsencrypt: An unexpected error occurred: VersionConflict: (certbot 0.11.1 (/root/.local/share/letsencrypt/lib/python2.7/site-packages), Or something along that lines. After trying to remember what I… Continue reading

Powershell – breaking a command down to multilines

So yeah .. I like things to be neat and clean and having a single line command in powershell is the norm for a lot of people. Example: New-MailContact -DomainController $dc -Name $alias.ContactName -ExternalEmailAddress $alias.ExternalEmailAddress -Alias $alias.ContactAlias -FirstName $alias.FirstName -Initials ” -LastName $alias.LastName -OrganizationalUnit $OU But like stated I like… Continue reading