【PowerShell】PSRemotingで認証ダイアログ無しで接続
検索
https://www.google.co.jp/search?ei=6PpaW4n9OtDn-Qam5KvACQ&q=ps-remoting+%E3%83%91%E3%82%B9%E3%83%AF%E3%83%BC%E3%83%89%E5%85%A5&oq=ps-remoting+%E3%83%91%E3%82%B9%E3%83%AF%E3%83%BC%E3%83%89%E5%85%A5&gs_l=psy-ab.3...286752.287509.0.287967.4.4.0.0.0.0.139.365.3j1.4.0....0...1c.1j4.64.psy-ab..0.1.137...33i160k1.0.D1akZtv5q1M
https://www.google.co.jp/search?q=enter-pssession+%E3%83%91%E3%82%B9%E3%83%AF%E3%83%BC%E3%83%89&oq=Enter-PSSession&aqs=chrome.1.69i57j0l5.2520j0j8&sourceid=chrome&ie=UTF-8
参考ページ
PowerShellで遠隔操作の準備
[Windows/PowerShell] PowerShell でパスワード入力のダイアログの表示無しに,リモートコンピ - GO-Global for Windows - きっとエイエスピー技術支援センター
[PSv2]PSSessionに一発で入るための関数 - PowerShell Scripting Weblog
【Win10】ハイバネーションを無効化、削除する方法
https://freesoft.tvbok.com/tips/pc_windows/del_hiberfil_sys.html
無効化(&削除):管理者でcmd実行
powercfg.exe /hibernate off
有効化:管理者でcmd実行
powercfg.exe /hibernate on
ステータス確認:管理者でcmd実行
powercfg.exe /a
11G増えた(?)
perlでディレクトリ配下のファイル数、合計サイズを出力
もっとスッキリさせたい
#!/usr/bin/perl my $size = 0; my $sizek = 0; my $sizem = 0; my @du; my $dusizek = 0; my $dusizem = 0; my $count = 0; my $sec; my $min; my $hour; my $mday; my $mon; my $year; open( IN, "ls -ltr $ARGV[0] |"); @INPUT_ARG = <IN>; close(IN); foreach $INPUT_ARG_TMP (@INPUT_ARG) { chomp ($INPUT_ARG_TMP); @RESULT_LIST = split(/\s+/,$INPUT_ARG_TMP); $size += $RESULT_LIST[4]; $count++; } ($sec,$min,$hour,$mday,$mon,$year) = (localtime(time))[0..5]; $year += 1900; $mon += 1; @du = split(/\s+/,`du -ksS $ARGV[0]`); $dusizek = @du[0]; print "DATA : ", "$year-$mon-$mday $hour:$min:$sec\n"; print "PATH : ", $ARGV[0], "\n"; print "DIR SIZE [ls - KB] : ", $size = &SIZE_CONV(KB), "\n"; print "DIR SIZE [du - KB] : ", $dusizek = @du[0], "\n"; print "DIR SIZE [ls - MB] : ", $size = &SIZE_CONV(MB), "\n"; print "DIR SIZE [du - MB] : ", $dusizem = @du[0] / 1024, "\n"; print "FILE COUNT : ", $count, "\n"; print "----------------\n"; sub SIZE_CONV { my ($arg) = @_; my ($return) = 0; if ( "KB" eq $arg) { $return = ($size / 1024) ; } elsif ( "MB" eq $arg ) { $return = (($size / 1024) / 1024) ; } return $return; }