<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yomon8</author_name>
  <author_url>https://blog.hatena.ne.jp/yomon8/</author_url>
  <blog_title>YOMON8.NET</blog_title>
  <blog_url>https://yomon.hatenablog.com/</blog_url>
  <categories>
    <anon>PowerShell</anon>
  </categories>
  <description>PowerShellのインデントが崩れてしまうことがあります。自動インデントをできるツールを探していたのですが、基になるスクリプト見つけたので、結局それを元に自分で関数作りました。（本当は標準のISEとかで実装されていると嬉しいのですが。。。）作ってみた関数はこれです。 function Get-FormattedCode { param($FilePath,$IndentLength = 4) $space = ' ' $indent = 0 $src = switch -regex -file $FilePath { '{\s*$' { ($space * $IndentLength) *…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyomon.hatenablog.com%2Fentry%2F2014%2F11%2F27%2F002228&quot; title=&quot;PowerShellコードを自動インデント・整形するスクリプト - YOMON8.NET&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-11-27 00:22:28</published>
  <title>PowerShellコードを自動インデント・整形するスクリプト</title>
  <type>rich</type>
  <url>https://yomon.hatenablog.com/entry/2014/11/27/002228</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
