How Microsoft Exchange Inventory is Gathered
This lesson explains how inventory information about Microsoft Exchange is gathered in Asset Vision. In order to collect certain data from servers related to applications, Asset Vision has support for a PowerShell probe. This is initially only configured to collect the Edition of Exchange Server, but could be enhanced in the future.
The PowerShell probe is ONLY run when Exchange Server is detected installed on a machine. It is not run against machines that do not have Exchange installed.
Powershell
Windows PowerShell is a command-line shell and scripting language that is designed for system administration and Automation. Built on the Microsoft .NET Framework, Windows PowerShell enables IT professionals and developers to control and automate the administration of Windows and applications. http://technet.microsoft.com/en-US/scriptcenter/dd742419.aspx
For those that want to learn more about PowerShell remoting – which is what we are using – see these links; http://msdn.microsoft.com/en-us/library/windows/desktop/ee706585(v=vs.85).aspx http://powershell.com/cs/media/p/7257.aspx
Pre-requisites
In order to be able to execute the PowerShell script, the following must be in place:
- The PAD machine must be running Windows PowerShell 2.0 and WinRM 2.0. This is the default on Windows 7 and Windows Server 2008 R2 and higher. See this link; http://support.microsoft.com/kb/968929
- The target machine must also be running Windows PowerShell 2.0.
- The PAD machine should be in the target machine’s Trusted Hosts list in WinRM. http://technet.microsoft.com/en-us/library/dd759202.aspx
- Windows PowerShell remote operation must be enabled. This means ensuring that it is enabled on the target machine. There are several ways to do this; http://blogs.technet.com/b/heyscriptingguy/archive/2010/11/16/enable-powershell-remoting-to-enable-running-commands.aspx and http://technet.microsoft.com/en-us/library/hh849694.aspx
Note that On Windows Server® 2012, Windows PowerShell remoting is enabled by default.
Credentials
The PowerShell probe will use the WMI credentials available to the PAD to authenticate with the remote machine. The default rights required for remote PowerShell execution is local Administrator on the remote machine. However, it is possible to use another account granted PowerShell execution rights. See the links below; http://msgoodies.blogspot.co.uk/2009/09/using-ps-session-without-having.html http://blogs.msdn.com/b/powershell/archive/2009/11/23/you-don-t-have-to-be-an-administrator-to-run-remote-powershell-commands.aspx