public void OnImport()
{
try
{
System.Management.Automation.PowerShell invoker = null;
invoker = System.Management.Automation.PowerShell.Create(RunspaceMode.CurrentRunspace);
invoker.AddScript(File.ReadAllText(FileUtilities.GetContentFilePath(
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
"AzureRmProfileStartup.ps1")));
invoker.Invoke();
}
catch
{
// This will throw exception for tests, ignore.
}
}