I'm getting a bunch of powershell errors with the exchange app (mainly around the Mailbox Store). This is on Exchange 2007 that hosts the public folders - really need to get this resolved as I've got high demand for this information.
get-publicfolderstats.ps1:
Exchange server "PWEXCHPUB01" was not found. Please make sure you have typed it correctly.
At C:\Program Files\SplunkUniversalForwarder\etc\apps\TA-Exchange-2007-MailboxStore\bin\powershell\get-publicfolderstats.ps1:40 char:36
+ $dblist = (Get-PublicFolderDatabase <<<< -server $env:ComputerName -Status|Where-Object { $_.Mounted -eq "True" })
Get-PublicFolderStatistics : A parameter cannot be found that matches parameter name 'ResultSize'.
At C:\Program Files\SplunkUniversalForwarder\etc\apps\TA-Exchange-2007-MailboxStore\bin\powershell\get-publicfolderstats.ps1:47 char:61
+ Foreach ($folder in (Get-PublicFolderStatistics -ResultSize <<<< Unlimited | Where-Object { $_.DatabaseName -eq $db.Name })) {
get-hoststats.ps1:
New-Object : Cannot find type [Collections.Generic.List[string]]: make sure the assembly containing this type is loaded.
At C:\Program Files\SplunkUniversalForwarder\etc\apps\TA-Exchange-2007-MailboxStore\bin\powershell\get-hoststats.ps1:31 char:31
+ $ServicesRunning = New-Object <<<< Collections.Generic.List[string]
New-Object : Cannot find type [Collections.Generic.List[string]]: make sure the assembly containing this type is loaded.
At C:\Program Files\SplunkUniversalForwarder\etc\apps\TA-Exchange-2007-MailboxStore\bin\powershell\get-hoststats.ps1:32 char:34
+ $ServicesNotRunning = New-Object <<<< Collections.Generic.List[string]
You cannot call a method on a null-valued expression.
At C:\Program Files\SplunkUniversalForwarder\etc\apps\TA-Exchange-2007-MailboxStore\bin\powershell\get-hoststats.ps1:38 char:24
+ $ServicesRunning.Add( <<<< $proc)
You cannot call a method on a null-valued expression.
At C:\Program Files\SplunkUniversalForwarder\etc\apps\TA-Exchange-2007-MailboxStore\bin\powershell\get-hoststats.ps1:38 char:24
+ $ServicesRunning.Add( <<<< $proc)
get-databasestats.ps1
The term 'Get-Counter' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.
At C:\Program Files\SplunkUniversalForwarder\etc\apps\TA-Exchange-2007-MailboxStore\bin\powershell\get-databasestats.ps1:12 char:14
+ (Get-Counter <<<< "\LogicalDisk($Drive)\% Free Space").CounterSamples[0]
.CookedValue
Posting this in a new answer box, since I can't seem to get the formatting commands to work in comments..
Upgraded to V2, everything but the get-publicfolderstats.ps1 works now.
When I run the following command, I get this error:
[PS] C:\Program Files\SplunkUniversalForwarder\etc\apps\TA-Exchange-2007-Mailb
Store\bin\powershell>Get-PublicFolderDatabase -server $env:ComputerName
Get-PublicFolderDatabase : Exchange server "PWEXCHPUB01" was not found. Please
make sure you have typed it correctly.
At line:1 char:25
+ Get-PublicFolderDatabase <<<< -server $env:ComputerName
+ CategoryInfo : NotSpecified: (0:Int32) [Get-PublicFolderDatabas
e], ManagementObjectNotFoundException
+ FullyQualifiedErrorId : 5882B319,Microsoft.Exchange.Management.SystemCon
figurationTasks.GetPublicFolderDatabase
Is there something I"m missing on the configuration side of our public folders?
Hi Brian,
Unfortunately, it looks like you have a problem with Powershell, and those are tricky to diagnose since they depend on who the Splunk instance is running as, what permissions are in effect, if the Powershell KB fixes are in place, and a host of other things that are outside our control. My first step would be to ensure that you are running the latest service pack for Windows 2003, and that your server is allowed to run Powershell local scripts (generally done through GPO). Open up a Powershell prompt (found under Accessories) and make sure you can run basic Powershell commands like Get-Counter (see http://technet.microsoft.com/en-us/library/dd367892.aspx)
You can run each of the Powershell scripts independently of the Splunk instance by running them from within an Exchange Management Shell - just change directory to the bin\powershell directory within the TA and run them. They will produce more debugging output that can potentially identify the error.
Failing all that, contact our Support group (assuming you have a support contract) and they will be happy to assist.
Looks like we're running powershell version 1 on these boxes. My Admin is going to see about getting it updated..
We're actually running Windows 2008 SP2.
I'll touch base with my wintel admins and then reach out if necessary..
Unfortunately I'm not so windows server literate 😛