1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PowerShellメモ

Last updated at Posted at 2020-04-30

基本知識

$hoge.document
# オブジェクト.プロパティ(情報)

$hoge.getElementById
# オブジェクト.メソッド(操作)

困ったこと①

".getElementById"が使えない!

"getElementById"はC言語で言うライブラリ関数のようなもので、デフォルトで使えるわけではない。

【原因】
getElementByIdを使用する場合は「管理者権限で実行する」必要がある。

【解決法】
.ps1ファイルを実行するbatファイルを作成すればよい

AutoLogin.bat
@echo off
powershell -File (.ps1ファイルの絶対パス) -verb runas
exit
1
2
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
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?