-
Hi All, I am trying to run cmdlets from VB.NET. I managed to create a session to a remote session and to run either basic powershell commands or Exchange 2010 cmdlets. However I have a problem when trying to run more complex scripts, like "Get-Mailbox | Where-Object {$_.database -match "database"...
-
Hi Everyone, I'd like to know why the formatting for this powershell doesn't work ? [PS] C:\> Get-MailboxStatistics | sort-object -descending totalItemSize | ft -autosize DisplayName, @{expression={$_.totalitem size.value.ToMB()};label=”Mailbox Size(MB)”}, itemcount, lastlogontime...
-
Hi everyone, I'd like to know how to send the email of the following script using Send-MailMessage ? Get-MailboxStatistics | sort-object -descending totalItemSize | select -first 20 | ft -autosize DisplayName, @{expression={$_.totalitemsize.value.ToMB()};label=”Mailbox Size(MB)”}, itemcount...
-
Hello all, I'm currently trying to make a powershell script that gives me the following information in an e-mail with an XML attachment that contains the asked information This is the information I need to get: Computername - How much space there is left/free - How much space there is used Memory...
-
Hi All, Im actually a newbie here...and has been struggling to create a script that would automatically create an Exchange contact for a particular user, and uses that contact to set a fowarding for that user. We are planning a big email server migration, and as part of the cut-over, we need to setup...
-
Hi, we have multiple DLs that we want to change the displayname to. for instanace our current display name says "yahoo users" and we want to create a simple shell to change/replace displayname "yahoo users" to "yahoo all mail users" I tried acheiving this through running...
-
Hi , Can someone help with an Exch 2007 PS script to format the result below to remove the shaded portion of ( domain.com/OU/OU USer Accounts/ ) and ( 12:16) from the managedby Attribute using the Get-DistributionGroup cmdlet in Exchange2007 Powershell : DisplayName OriginatingServer WhenCreated ManagedBy...
-
I have put together a script that pulls a list of servers in the array and then tests outlook and owa connectivity to each. I also added a menu that allows a restart of selected services on all servers that show an error in connectivity. What im wanting to do is be able to recycle or restart an IIS AppPool...
-
I'm writing a script in powershell. What I want to have happen, is to have a menu to restart a service appear based on an error being detected on the server. Say a service is not running, or outlook does not pass a connectivity test, I want the script to use both variables in determining to show...
Posted to
PowerShell for Exchange
(Forum)
by
jwhite
on
02-14-2012
Filed under: InvokeCommand, remoting, Exchange, script block, remote, powershell, exchange 2010, Powershell command:
-
In my script I created a menu that allowed the user to restart a service on the server from within the powershell session. My idea was to use a if (condition) that showed the menu if the condition applied. I got it figured out though. I did this: if ((condition is true) -or (condition2 is true) -or ...