In this article we will look for the PowerShell Scripts to export “Alternate Access Mapping (AAMs)” Settings from source SharePoint Farm. This information will be helpful to track all the “AAMs” defined in SharePoint Farm.

In Step 1 we will add the PowerShell Snapin to PowerShell Script as usual

In Step 2 we define a function and initiate the export CSV file with Column Headers. For this demo I am exporting a few important properties like “Incoming Url, Zone, Public Url” but you may query all possible properties as you deemed fit

In Step 3 we execute the “Get-SPAlternateURL” cmdlet to query the required properties

In Step 4 we loop through the properties collection for all AAM Mapping and list out the queried properties for each mapping

In Step 5 we add the content of properties for each of the AAM Mapping to the CSV file

In Step 6 we will set the settings file path and call the function to export the AAM Mappings

Once this script get executed successfully, it will export the AAM Mappings in a CSV File as shown below in Step 7

In this article we will look for the PowerShell Scripts to export IIS Settings from source SharePoint Farm. This information will be helpful to track all the “Application Pool” accounts used to configure Web Applications in the Farm.

There could be more properties that you can export but for this demo I am considering following important properties:

Site Name, Site Path, Application Pool, Bindings, Identity, Password

In Step 1 we will import module “WebAdministration” which gives us the methods to work with “IIS Manager” Objects

In Step 2 we will retrieve items from IIS directory using wildcard path search “IIS:\Sites\*”

In Step 3 we will enlist the header of the output Settings file by using the name of properties that we are pulling from IIS

In Step 4 we will fetch properties “Site Name, Site Path, Application Pool, Bindings, Identity, Password” for each IIS Site

In Step 5 we will append the properties to the output file for each of the IIS sites we have in Farm

In Step 6 we are specifying the path for output file which would be in the form of CSV

In Step 7 we are calling the function executing Step 1-6

Once the script executed successfully it will generate the output file as shown below-

And here is the data that was added to the output file during the execution of the above script

We can see IIS details for each Site (Web Application) added to the SharePoint Farm and this information is really crucial to document during the Migration planning phase.