Chinaunix首页 | 论坛 | 博客
  • 博客访问: 739616
  • 博文数量: 256
  • 博客积分: 3502
  • 博客等级: 中校
  • 技术积分: 3988
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-17 21:13
文章分类

全部博文(256)

文章存档

2014年(11)

2013年(134)

2012年(111)

我的朋友

分类: 系统运维

2013-12-05 13:51:38

每一个好的博客文章应该有一些现实生活中的故事,以帮助您直观为什么事情发生,所以这里有云:
故事
有一天,而坐在办公室里更新我需要记录的虚拟基础架构灾难恢复文档,大家都知道,像漂亮的照片管理器,因此首先他们要求是怎样的基础设施看起来相当图。
在页面上滴我40 VM对象后,我开始变得有点无聊,我看了看其他的选择。已经有执行此作业的市场上一个伟大的工具, Veeam的记者生成多个文件,并做了伟大的工作,但作为一个承包商我有一个零预算。知道你可以做一些非常酷的东西的Powershell我不知道这将是多么容易钩到Visio中的COM对象来获取PowerShell来创建文档我。
事实证明,它不是那么难,有几个粘时刻,我必须参照的Visio论坛,并通过使用Visio中的唯一参考PowerShell的一个很好的起点,我能找到的(退房CommandBreak_感谢Joeseph )后解释是球员在Visio论坛,并解释为什么我使用PowerShell ,因为我觉得这是第一次,这些人已经听说过什么PowerShell中,我开始与一些有c#的例子回PowerShell的。
The Result
The result is by no means a totally polished all singing all dancing documenter that documents your VI from the left, from the right and upside down but what it is, is an example of what you can do with the Visio COM objects and powershell combined.
I have not yet included all the options I would like, in future versions I would like to be able to document the networking setup / storage paths etc but I’m working on something else so wanted to get this script out into the public.
Instructions
You will need:
  • Powershell V1 (I haven’t tried it on V2 yet)
  • The VI Toolkit
  • Microsoft Visio (I have only tried 2003 +)
How to use:
  1. Download the zip file from the bottom of this page
  2. Once extracted copy the  ‘My-VI-Shapes.vss‘ file to your ‘My Documents\My Shapes’ folder.  If the folder does not exist create it and copy the file in.
  3. Run the powershell script with the following options:
To diagram the entire Infrastructure:
vDiagram.ps1 -VIServer MYVISERVER
 
To diagram a specific cluster use the following:
vDiagram.ps1 -VIServer MYVISERVER -Cluster “Production Cluster’
阅读(1788) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~