<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>munibus</author_name>
  <author_url>https://blog.hatena.ne.jp/munibus/</author_url>
  <blog_title>Muni Bus</blog_title>
  <blog_url>https://munibus.hatenablog.com/</blog_url>
  <categories>
    <anon>PowerShell</anon>
  </categories>
  <description>コマンドラインで関数を定義したスクリプトを呼び出せばよい。ただし、実行時には実行演算子（＆）で呼び出すのではなくドットソースをすること。ドットソースをすることで、スクリプト内で定義された変数と関数は、そのスクリプト終了後も持続する。スクリプトをドットソースするには、ドット演算子（．）を使ってスクリプト名をパラメーターとして指定すること。 以下のスクリプトは累乗と階乗を求める関数をそれぞれpower、factorialとして作成したものでdotsource.ps1と保存する。このスクリプトをドットソースするまでは計算できないが、ドットソースすることで計算するできるようになる。 function …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmunibus.hatenablog.com%2Fentry%2F2023%2F04%2F01%2F235722&quot; title=&quot;【PowerShell】コマンドラインで自作関数を使用する - Muni Bus&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>2023-04-01 23:57:22</published>
  <title>【PowerShell】コマンドラインで自作関数を使用する</title>
  <type>rich</type>
  <url>https://munibus.hatenablog.com/entry/2023/04/01/235722</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
