Following up on my previous post on how to find out who has send-as rights on a mailbox, here’s how you can do the same for a distribution group.

Get-ADPermission -identity distributiongroupname | where {($_.ExtendedRights -like “*Send-As*”) -and ($_.IsInherited -eq $false) -and -not ($_.User -like “NT AUTHORITY\SELF”)} | FT -Wrap

It’s essentially the same command. Instead of piping the mailbox object to the Get-ADPermission cmdlet, here you’re telling the Get-ADPermission cmdlet the name of the distribution group you want to find who has permissions for.

 

Here’s a quick way to find out who has send-as permissions on a particular mailbox

Get-Mailbox -identity mailboxname | Get-ADPermission | where {($_.ExtendedRights -like “*Send-As*”) -and ($_.IsInherited -eq $false) -and -not ($_.User -like “NT AUTHORITY\SELF”)} | FT -Wrap

You can also pipe in all mailboxes or a server or database to find out send-as permissions on all mailboxes as follows

Get-Mailbox | Get-ADPermission | where {($_.ExtendedRights -like “*Send-As*”) -and ($_.IsInherited -eq $false) -and -not ($_.User -like “NT AUTHORITY\SELF”)} | FT -Wrap

Get-Mailbox -Server servername | Get-ADPermission | where {($_.ExtendedRights -like “*Send-As*”) -and ($_.IsInherited -eq $false) -and -not ($_.User -like “NT AUTHORITY\SELF”)} | FT -Wrap

 

You can log off a Cisco ASA VPN session from the command line as follows

Find the users session index

show vpn-sessiondb | include (username)

The index field is what you’re looking for. Once you have this you can log that particular session off by using the following command.

vpn-sessiondb logoff index XXXX

where XXXX is the index number.

 

Here’s how you can quickly list the currently active IPSec VPN sessions on your ASA.

show vpn-sessiondb remote

You can of course use modifiers to filter only the text you’re interested in. For example

show vpn-sessiondb remote | include (Username|Duration)

This will give you the username and duration of the session.

You can also get a summary of all the connections as follows

show vpn-sessiondb summary

© 2012 !NSFW Suffusion theme by Sayontan Sinha