<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>merrywhite</author_name>
  <author_url>https://blog.hatena.ne.jp/merrywhite/</author_url>
  <blog_title>CAFE BREAK</blog_title>
  <blog_url>https://cafebreak.hatenablog.com/</blog_url>
  <categories>
    <anon>Windows</anon>
  </categories>
  <description>バッチファイルからPowerShellスを起動し、同階層、カレントディレクトリの.ps1スクリプトを指定する方法に関する情報です。 特に絶対パスを使用して固定の場所から実行するなら考慮不要ですが、場所を指定して実行する場合、例えばデスクトップなどから実行する場合に便利です。 まずは、こちらです。 よくネットで検索すると出てくるパターンです。 前提として、バッチファイルを作成して、バッチファイル内に記述しています。 pushd %~dp0powershell -NoProfile -ExecutionPolicy RemoteSigned &quot;.\script.ps1&quot; 「pushd %~dp0」…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcafebreak.hatenablog.com%2Fentry%2F2023%2F12%2F31%2F153804&quot; title=&quot;バッチファイルからPowerShellスを起動し、同階層、カレントディレクトリの.ps1スクリプトを指定する - CAFE BREAK&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>https://cdn-ak.f.st-hatena.com/images/fotolife/m/merrywhite/20210424/20210424093736.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-12-31 15:38:04</published>
  <title>バッチファイルからPowerShellスを起動し、同階層、カレントディレクトリの.ps1スクリプトを指定する</title>
  <type>rich</type>
  <url>https://cafebreak.hatenablog.com/entry/2023/12/31/153804</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
