LoginSignup
1
0

はじめに

もう春ですね:cherry_blossom:

折角なので新しいことを始めよう(トライしよう)かと、 Azure の管理を CLI ではなく PowerShell で始めてみました。
そこで早速躓いたので Debug をしたくなったのですが、なかなか検索ヒットしませんでした。ので、ここに記します。

早速答え(How to)

One of the first steps you should take in troubleshooting a problem with the Azure Az PowerShell module is to enable debug logging.
To enable debug logging on a per command basis, specify the Debug parameter.

Get-AzResource -Name 'DoesNotExist' -Debug

To enable debug logging for an entire PowerShell session, you set the value of the DebugPreference variable to Continue.

$DebugPreference = 'Continue'

反省

検索してもなかなか辿り着かなかったのでメモとしてここに記しました。
PowerShell debugで検索してたけど、Az PowerShell module限定の方法っぽいから見つけられなかったのかもなぁ。
公式読むの大事ですね。

おわりに

最後まで見ていただき、ありがとうございます。
少しでも読んでいただいた方の役に立てたら幸いです。
よかったらチャンネル登録(フォロー)、高評価(いいね:heart_decoration:)、コメント:pen_fountain:などなど何でもお願いします:pray:

週一で投稿目指しています。もし何かリアクションをしてくれるとやる気が出るので、次週は投稿することを約束します。今のところ約束は履行されています(投稿なかった週はリアクションが前週になかったのだからと正当化して休んでます:grimacing:

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0