Tuesday, January 26, 2016

PowerShell to update and refresh Excel data connections

Scenario:
You have multiple Excel files that applies the same template and formatting, but uses different data sources.
*** My requirement was to replace oData connections. I needed a simple script that would open an Excel file, loop through the data connections, and replace the data connection string.

Tested on Excel 2013, run PowerShell 64bit using Windows 7 Pro.

Wednesday, January 13, 2016

PowerShell script to list and export top navigation links

This PowerShell snippet will parse a single site for the top or global navigation links, display in the shell window, and output to an XML file in the following format:

 <Navigation>  
 <Group Title="Regions" Url="http://regions">  
 <Link>  
      <Name>Asia Pacific</Name>  
      <Url>http://apac</Url>  
      <Target />  
 </Link>  
 <Link>  
      <Name>EMEA</Name>  
      <Url>http://emea</Url>  
      <Target />  
 </Link>  
 <Link>  
      <Name>US</Name>  
      <Url>http://us</Url>  
      <Target />  
 </Link>  
 </Group>  
</Navigation>  

Related Posts Plugin for WordPress, Blogger...