qshinoの日記

Powershell関係と徒然なこと

2017-03-14から1日間の記事一覧

日付、連番をファイル名に by powershell

日付をファイル名に $now = Get-Date -Format "yyyy-MMdd-HHmmss" Write-Output "poi" | Out-File "memo-$now.txt" 連番をファイル名に 日付を打つのが面倒なので、連番をファイル名にする。先のが2行に対して2行多い4行。 $index = "index.txt" (Get-Date -…

des暗号化その2 by powershell

DES暗号化その2 by powershell 使い方から $in="password" $key="keyword" $des=get-des($in,$key) $undes=get-undes($des,$key) $in $des $undes 暗号 function get-des($in, $key) { $des = New-Object System.Security.Cryptography.DESCryptoServiceProv…

powershell module

Module Manifest ファイル名が .psd1 作成方法は3種類 人手作成 New-ModuleManifest コマンド テンプレートを写す 人手作成 こんな感じ '@{ModuleVersion="1.0"}' > myModuleName.psd1 New-ModuleManifestコマンド こんな感じ New-ModuleManifest myModuleNa…

wpf ショートカット

wpf

KeyBindingを使うらしい。 <Window.InputBinding> <KeyBinding Command="{Binding Path="CommandX" }" Gesture=""/> </閉じる> <... <MemuItem ... Command={Binding Path="CommandX"} /> 参考 MSDN解説 http://msdn.microsoft.com/ja-jp/library/system.windows.controls.menuitem.inputgesturetext.aspx こんな感じ? https://yone64.wordpres…</memuitem>

wpf selectall

wpf

メニューのSelectAll <ContextMenu> <MenuItem Command="ApplicationCommands.Cut" /> <MenuItem Command="ApplicationCommands.Copy" /> <MenuItem Command="ApplicationCommands.Paste" /> <MenuItem Command="ApplicationCommands.SelectAll" /> </ContextMenu> 参考 http://stackoverflow.com/questions/29694307/add-select-a…

IIS version

IIS

IIS 10.0 WS2016, Win10 8.5 WS2012R2, Win8.1 8.0 WS2012, Win8 7.5 WS2008R2, Win7 7.0 WS2008, Vista

IISアクセス権限 by Powershell

Powershellによるアクセス権限設定 Add-WebConfiguration "/system.ftpServer/security/authorization" -value @{accessType="Allow";users="?";permissions=3} -PSPath IIS:\ -location FTPFolder permissions=3 が重要で、"Read,Write"ではダメらしい。 pe…