Kenneth Qvistgaard Dalbjerg, IT Konsulent i århus
Citrix Certified

Exchange 2010, show permission on all folders in all mailboxes

Tuesday, May 15th, 2012 Posted in Exchange, Powershell | No Comments »

Here is a script, that runs though you Exchange server, and return all permission on all folders in all mailboxes. The script needs to be running from the Exchange management Shell, and will create a subfolder in c:\ call ExchangeMailboxPermission, where ...

Exchange 2010, powershell full access and send-as permission

Monday, May 14th, 2012 Posted in Exchange | No Comments »

To get a CSV file, from you exchange with full access and send as permission, from all you mailboxes run these commands: Full Access Get-Mailbox | Get-MailboxPermission | where {$_.user.tostring() -ne "NT AUTHORITY\SELF" -and $_.IsInherited -eq $false} | Select Identity,User,@{Name='Access Rights';Expression={[string]::join(', ', ...

Powershell: Get all email aliases for a mailbox account on Exchange 2007/2010

Monday, March 19th, 2012 Posted in Exchange | No Comments »

Get-Mailbox -id KennethDalbjerg | select-expand EmailAddresses | %{$_.SmtpAddress}

Get number of all desktops in Citrx Xendesktop with powershell in all desktop groups

Thursday, October 27th, 2011 Posted in Powershell, Programmering | No Comments »

To get sum of all desktops in the Citrix Xendesktop (5) farm, just run this commands: Asnp Citrix.* Get-BrokerDesktopGroup | measure-object -property TotalDesktops -sum | select sum

Give all users access to all mailbox calendar

Monday, February 14th, 2011 Posted in Exchange, Powershell | No Comments »

foreach ($Mailbox in (Get-Mailbox -ResultSize Unlimited)) { Add-MailboxFolderPermission -identity "$($Mailbox.Name):\calendar" -AccessRights Author -User default }

Powershell – Get all Security Groups from AD

Thursday, January 27th, 2011 Posted in Powershell | No Comments »

First install http://www.quest.com/powershell/activeroles-server.aspx Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue $File = “C:\ita\securitygroups.txt” $AllGroups = get-qadgroup -grouptype "Security" | select name, Description $AllGroups | Foreach { echo "" echo "" echo $_.name echo $_.description } | out-File $File

Powershell – Export user/mailboxes to CSV file

Thursday, January 27th, 2011 Posted in Powershell | No Comments »

get-mailbox | select name, alias, samaccountname, RecipientType, RecipientTypeDetails, displayname | export-csv C:\ITA\usersexport.csv -encoding unicode

Powershell – Import users from CSV file

Thursday, January 27th, 2011 Posted in Powershell | No Comments »

import-csv user.csv | foreach-object { echo $_.Displayname New-Mailbox -name ( $_.Name) -Alias $_.Alias -SamAccountName $_.SamAccountName -RecipientType $_.RecipientType -RecipientTypeDetails $_.RecipientTypeDetails -Displayname $_.Displayname }

Powershell – Show all users in DistributionGroup

Thursday, January 27th, 2011 Posted in Powershell | No Comments »

$File = "C:\ita\groupslog.txt" $Mailboxes = Get-DistributionGroup | select name , alias ,displayname,EmailAddresses $Mailboxes | ForEach { echo "" echo "" echo $_.name Get-DistributionGroupMember -id $_.alias } | out-File $File

Powershell – Show witch users have access to mailboxes

Thursday, January 27th, 2011 Posted in Powershell | No Comments »

$file =  "C:\ita\fulladgang.txt" $AllUsers = get-mailbox  | select SamAccountName, name, alias $AllUsers | Foreach { echo "" echo "" echo "" echo $_.name get-mailboxfolderpermission -identity $Mailbox } | out-File $File