I am running Server 2012R2 which is running Powershell 4 natively including all the stock modules like ActiveDirectory etc. I also have Exchange 2010 management tools installed and they are working correctly. The issue I am running in to is I need to either a) run at Powershell 4 for AD commands and invoke commands in Exchange shell (Version 3) or run from version 3 and invoke AD commands in to a Powershell 4 instance.
AD won't load in the Exchange shell (3) nor will Exchange load in to the AD (4). Invoke-Command doesn't seem to have a version identifier. I think I could get this to work by having the AD shell (4) basically build a .ps1 on the fly then call powershell with -version 3 (or vis versa) but this seems like a odd convoluted back door option.
To summerize what I am working on: I am getting information from AD about last logons etc and then trying to clean up and set archive settings on Exchange. All of this works fine if I run 2 shells and execute the pieces, exporting the results from one shell to a .csv that the other one picks up and works with. I am just trying to put it all together in one now and not leave random .csv files around to work on.
Am I just missing something here?
AD won't load in the Exchange shell (3) nor will Exchange load in to the AD (4). Invoke-Command doesn't seem to have a version identifier. I think I could get this to work by having the AD shell (4) basically build a .ps1 on the fly then call powershell with -version 3 (or vis versa) but this seems like a odd convoluted back door option.
To summerize what I am working on: I am getting information from AD about last logons etc and then trying to clean up and set archive settings on Exchange. All of this works fine if I run 2 shells and execute the pieces, exporting the results from one shell to a .csv that the other one picks up and works with. I am just trying to put it all together in one now and not leave random .csv files around to work on.
Am I just missing something here?