Search found 216 matches

by ITEngineer
Sun Sep 02, 2018 7:18 pm
Forum: PowerShell
Topic: How to combine the PowerShell script to export list of Disabled AD user mailbox with Mailbox size column?
Replies: 2
Views: 1792

Re: How to combine the PowerShell script to export list of Disabled AD user mailbox with Mailbox size column?

I can recommend posting in the Exchange forum to learn how to use the Exchange CmdLets and how to work with Shared mailboxes. You could also search for blog posts discussing how to work with shared mailboxes. Example: Get-Mailbox -RecipientTypeDetails SharedMailbox https://www.google.com/search?new...
by ITEngineer
Fri Aug 31, 2018 1:02 am
Forum: PowerShell
Topic: How to combine the PowerShell script to export list of Disabled AD user mailbox with Mailbox size column?
Replies: 2
Views: 1792

How to combine the PowerShell script to export list of Disabled AD user mailbox with Mailbox size column?

Hi People, I need someone to assist me in modifying the script below so it is showing all Disabled AD user account with Exchange User mailbox still enabled ( not Shared Mailbox )? Because the script below also returns Shared Mailboxes which is always created as disabled AD user account. $Allusers = ...
by ITEngineer
Tue Aug 28, 2018 11:37 pm
Forum: PowerShell
Topic: Problem in executing PowerShell script as Scheduled Task & Run As Administrator
Replies: 5
Views: 3505

Re: Problem in executing PowerShell script as Scheduled Task & Run As Administrator

Why are you using PowerShell for a batch file? Just run the batch file. An exit code of 1 means that the execution failed. It is the other way around, The Backup report is 4000+ lines of PowerShell code which I have tried to encapsulate into the BATCH file for easy executable, but somehow it is sti...
by ITEngineer
Tue Aug 28, 2018 10:08 pm
Forum: PowerShell
Topic: Problem in executing PowerShell script as Scheduled Task & Run As Administrator
Replies: 5
Views: 3505

Re: Problem in executing PowerShell script as Scheduled Task & Run As Administrator

Many batch scripts cannot be run outside of a UI session. They may need a full profile. Have you tried to manually create the task with the batch script? Hi Mr. Vierra, I have manually created the Scheduled task to call the .PS1 as per the MS Blog article above, but it is still failed to launch wit...
by ITEngineer
Tue Aug 28, 2018 8:11 pm
Forum: PowerShell
Topic: Problem in executing PowerShell script as Scheduled Task & Run As Administrator
Replies: 5
Views: 3505

Problem in executing PowerShell script as Scheduled Task & Run As Administrator

I'm having the problem when trying to execute this Powershell as the Scheduled task. I have followed this steps: https://blogs.technet.microsoft.com/heyscriptingguy/2012/08/11/weekend-scripter-use-the-windows-task-scheduler-to-run-a-windows-powershell-script/ and use the following Argument : -Execut...
by ITEngineer
Wed Aug 22, 2018 10:27 pm
Forum: PowerShell
Topic: Exchange PS Script to Export the Unused Distribution List in Exchange Server as .CSV?
Replies: 6
Views: 3391

Re: Exchange PS Script to Export the Unused Distribution List in Exchange Server as .CSV?

Your issue is very muddy. If you want empty groups then this is the method: [/code] $dist = (Get-DistributionGroup -Filter {Name -like "*IT*"} –ResultSize Unlimited | Where-Object { (Get-DistributionGroupMember –Identity $_.Name –ResultSize Unlimited).Count -eq 0} )[/code] Yes, that does ...
by ITEngineer
Wed Aug 22, 2018 5:10 pm
Forum: PowerShell
Topic: Exchange PS Script to Export the Unused Distribution List in Exchange Server as .CSV?
Replies: 6
Views: 3391

Re: Exchange PS Script to Export the Unused Distribution List in Exchange Server as .CSV?

"Count" is an integer and not a string. Always remember that string numbers cannot normally be compare correctly. Hm.. no wonder it doesn't work. however, I've tried to modify the script to be like the following: $dist = (Get-DistributionGroup -Filter {Name -like "*IT*"} –Result...
by ITEngineer
Wed Aug 22, 2018 4:22 pm
Forum: PowerShell
Topic: Exchange PS Script to Export the Unused Distribution List in Exchange Server as .CSV?
Replies: 6
Views: 3391

Re: Exchange PS Script to Export the Unused Distribution List in Exchange Server as .CSV?

Dwight, Thanks for the reply. However, the script that you've suggested somehow is not working as it should: $emptDLs = @() $DLs = Get-DistributionGroup $DLs | Foreach { $count = (Get-ADGroupMember -identity $_.Name).Count If ($count -gt "0") { Write-Host "DL $_.DisplayName is empty. ...
by ITEngineer
Wed Aug 22, 2018 5:46 am
Forum: PowerShell
Topic: Exchange PS Script to Export the Unused Distribution List in Exchange Server as .CSV?
Replies: 6
Views: 3391

Exchange PS Script to Export the Unused Distribution List in Exchange Server as .CSV?

Hi, Using PowerShell and Exchange 2013 remoting from my laptop, I need some help in fixing the below script to export the least used Distribution Group: $hts = Get-TransportService $dls = Get-DistributionGroup –ResultSize Unlimited $hts | ForEach-Object { Get-MessageTrackingLog -ResultSize Unlimited...