時々思い出したようにPowerShell の記事を書いてみます。 スクリプトでよくあるのが、sudo で実行時に権限があるスクリプトの許可をしたいというケースです。 Windows は組み込みsudo がないので面倒でしたが、現状なら scoop で sudo をインストールするといいと思います。 https://scoop.sh/scoop.sh scoop install sudo これで sudo ./your_script.ps1 とできるので特権が必要なときに、必要な権限を渡すことができます。 さて今回の記事は、Windows において実行中のスクリプトや関数が特権が必要な場合に、sudo を使わずにUACダイアログを出して昇格したPowerShellで同関数を実行し直してほしいというケースです。 通常の特権昇格フロー + Windows Diffender操作のため利用には注意
Last update: 2024-06-13 This is the lists of AWS PowerShell Cmdlets equivalent to AWS CLI commands. Version AWS CLI: 2.16.7 (CHANGELOG) AWS Tools for PowerShell: 4.1.599 (CHANGELOG) Contents * Disclaimer * This site is created by automatic generation. For that reason, some content may not be accurate.
しばたです。 本日非常に珍しい内容でPowerShell Team Blogが更新されたので紹介します。 Windows Security change affecting PowerShell セキュリティ更新によるPowerShellの挙動の変更 上記ブログ記事の内容としては、CVE-2019-0543に対応したセキュリティ更新(2019年1月9日のWindows Update)を適用すると、非常にレアなケースでWindows PowerShellおよびPowerShell Coreの挙動に破壊的変更が生じるというものです。 実際どの様な破壊的変更かについて以下で説明します。 このセキュリティ更新による破壊的変更 このセキュリティ更新で影響を受けるのは 非管理者ユーザーでローカルホストに対してPowerShell Remotingで接続する(local loopback remotin
Always on the clock これまでに、セミナーやカンファレンス、書籍を通じてお会いした方々、そしてこれから出会うであろう方々のために Microsoft テクノロジーを中心とした情報を株式会社エストディアンの国井 傑 (くにい すぐる) が提供するブログです。 皆さんこんにちは。国井です。 最近、Microsoft Intuneに関するお問い合わせが多くなっており、 セミナーをやってほしいとのご連絡をいただくことも多くなってきました(ありがたいことです)。 そこで、今日はMicrosoft Intuneの話をしようと思います。 具体的にはPowerShellからMicrosoft Intuneを操作する方法についてです。 Microsoft IntuneはGUIからの操作をサポートしており、それはそれで便利なのですが、PowerShellからまとめて設定できるような方法もあっ
先日リリースされたPowerShell Core 6.1の新機能一覧に、以下の様にWindows PowerShellに対する互換性について記載されています。 On Windows, the .NET team shipped the Windows Compatibility Pack for .NET Core, a set of assemblies that add a number of removed APIs back to .NET Core on Windows. We've added the Windows Compatibility Pack to PowerShell Core 6.1 release so that any modules or scripts that use these APIs can rely on them being availabl
AWS Developer Tools Blog Announcing Lambda Support for PowerShell Core Today we are excited to release support for PowerShell Core 6.0 with AWS Lambda. This new feature enables you to execute PowerShell scripts or functions in response to any Lambda event, such as an Amazon S3 event or Amazon CloudWatch scheduled event. Setting up a development environment Before we get started developing PowerShe
PowerShell (Core) and Markdown Markdown is a great way to document, well anything! If you haven’t had a chance to write it yet a time will probably come sooner than later when you’ll have a case to use it. You’ll find markdown just about everywhere these days. Places like VSTS, Github repository documentation, comment sections on sites Github or Reddit, and even the engine for this blog uses markd
Windows PowerShell 5.1 is built on top of the .NET Framework v4.5. With the release of PowerShell 6.0, PowerShell became an open source project built on .NET Core 2.0. Moving from the .NET Framework to .NET Core allowed PowerShell to become a cross-platform solution. PowerShell runs on Windows, macOS, and Linux. There are few differences in the PowerShell language between Windows PowerShell and Po
とあるPull RequestがきっかけでPowerShell 6.0 RC1から範囲演算子(..演算子)が拡張され、Int型だけでなくChar型も扱える様になりました。 本エントリではその内容について説明します。 範囲演算子でChar型が扱える様になります もともと範囲演算子(..)は、 1..5 の様に[Int型の数値]..[Int型の数値]の形式をとり、指定した数値間で連続する要素を持つ配列を生成します。 # 1~5を要素にもつ配列が生成される 1..5 => (1,2,3,4,5) 今回、この指定がChar型を取れる様に拡張され、以下の様な記述が可能になります。 'a'..'e' この例の場合だとa~eを要素にもつ配列が生成されます。 # a~eを要素にもつ配列が生成される 'a'..'e' => ([char]'a', [char]'b', [char]'c', [char]'d
対象 bashやらzshやらは使ったことある人 PowerShell初心者 PowerShellを毎回ググって使ってる人 ググる回数を減らすための基本 コマンドレットとは コマンドレットとは、シェルでいうコマンドに似た概念です。名前の問題はどうでもよいのですが、一つだけわかっておいた方がよいことは、 Do-Somethingの形式になっている という点です。例えば、設定されているエイリアスを確認したい場合には、Get-Aliasと打てばその一覧が表示されますし、逆にエイリアスを設定したい場合にはSet-Alias show Get-ChildItemと打つことでshowというエイリアスを作ることができます。この場合、SetがDo(=セットする、変数に代入する)にあたり、AliasがSomething(=エイリアスを)ということになります。このことを認識しておくと、何かの一覧を取得するための
Dev BlogsPowerShell TeamPowerShell 6.0 Roadmap: CoreCLR, Backwards Compatibility, and More! As we’ve made progress on open-source PowerShell, it’s time to start talking more in-depth about: different editions of PowerShell PowerShell’s relationship to .NET Core and .NET Standard the future of PowerShell when you might expect to start taking a dependency on PowerShell Core 6.0 in production PowerSh
小ネタです。 以前、以下エントリにて「PowerShellスクリプトでOS初期設定を一括で行う」内容について投稿していましたが、ちょっと内容をアップデートした形のものを最近使うようになっていたのでこちらでも公開しておこうと思います。 PowerShellスクリプトサンプル(Windows Server環境構築 初期設定の一括実行) | Developers.IO 実行スクリプトサンプル スクリプトは以下となります。 使い方 PowerShellコンソールを起動し、上記ファイルを実行可能なパスに保存・作成しておきます。 もしくは以下の形でファイルをPowershellのコマンドを使いダウンロードしておきます。(gistからダウンロードした場合文字コードに不都合が生じるのでファイルダウンロード後、Shift_JISに一旦変換しています) Powershellでファイルの文字コードを変換 - Q
6 月 21 日頃?に PowerShell 6.0 の Beta 3 が出ていました。PowerShell 6.0 はオープンソース、マルチプラットフォームの PowerShell (Core) 。 GitHub PowerShell/PowerShell: PowerShell for every system! [URL] https://github.com/PowerShell/PowerShell Latest release (v6.0.0-beta.3 release of PowerShellCore) [URL] https://github.com/PowerShell/PowerShell/releases/tag/v6.0.0-beta.3 Linux の PowerShell 6.0 Beta 3 から Windows に PowerShell Remoting
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く