qshinoの日記

Powershell関係と徒然なこと

2021-11-01から1ヶ月間の記事一覧

githubへの移行方法

githubへの移行方法 複数ある模様。 とりあえず、github doc記載のgithub 間で移動する方法。これをローカル→github でも使えるかも。 まずはgithub to github github に使用中リポジトリ/oldと移行先として作成した空のリポジトリ/newがある所から始める。 …

Ubuntu vlan

ubuntu vlan netplanを使う。 /etc/netplan/xx.yml network: ethernets: eth0: addresses: [] dhcp4: true vlans: vlan.11: id: 11 link: eth0 addresses: [192.168.0.22] version: 2 sudo netplan -debug generate sudo netplan apply

Windows bcdedit, Windows Boot Manager

Windows Boot Manager config bcdedit ref https://chirashi.twittospia.com/%E6%8A%80%E8%A1%93/windows10%E3%81%A7%E5%8F%A4%E3%81%84%E3%83%96%E3%83%BC%E3%83%88%E3%83%A1%E3%83%8B%E3%83%A5%E3%83%BC%E3%82%AA%E3%83%97%E3%82%B7%E3%83%A7%E3%83%B3%E3%…

Powershell GPU DDA/Discreet Device Assignment

DDA Microsoft Discreet Device Assignment/DDAでGPUをVMにパススルー。 全体の流れはdda-sample関数参照。エラー処理なしの一方通行。VM設定→デバイスのロケーションパス取得→VMにデバイスをアサイン。 Sample code Parameter VM MMIO space for low and Hi…

Powershell install parameters

msiexec.exe /package PowerShell-7.1.5-win-x64.msi /quiet ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1

Powershell PSRemoting GUI app

remote GUI AP by Powershell タスクスケジューラを使う。 function runtask($name, $ap){ $action = New-ScheduledTaskAction -Execute $ap $trigger = New-ScheduledTaskTrigger -Once -At '00:00' $task = Register-ScheduledTask -TaskName 'run calc' -…

Powershell Authentication by invoke-web-request

ref https://get-powershellblog.blogspot.com/2017/10/new-powershell-core-feature-basic-and.html?m=1

Powershell on android

powershell on android まあ、できるようだが、Powershell の存在価値って、windows だからという気がする。 Windows環境メインなら、欲しいかな。 特に.NET のアセンブリが使えるのか? ref https://stuncloud.wordpress.com/2020/07/26/android-powershell/

powershell remote on ssh

option for ssh session New-PSSession, Enter-PSSession, and Invoke-Command [-HostName <string>] [-UserName <string>] [-KeyFilePath <string>] sample code Linux to windows Enter-PSSession -HostName WinVM1 -UserName PTestName win to win $session = New-PSSession -Host</string></string></string>…

Enter-PSSession no password

do this $sv="10.0.0.1" $user="poi" $pw = "pass" $pass = ConvertTo-SecureString -AsPlainText $pw -Force $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $user, $pass Enter-PSSession -ComputerName $sv -Cre…

Linux 3D benchmark

memo https://www.howtoforge.com/tutorial/linux-gpu-benchmark/amp/

Windows serial console

windows server bcdedit /store /ems {current} on bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200

zynq and.petalinux

boot.scr https://tuxengineering.com/blog/2021/09/22/Patching-U-Boot-boot-script-in-Petalinux-2021.1.html 2021.1 changes https://tuxengineering.com/blog/2021/07/17/Upgrading-Petalinux-2021.html mac address https://support.xilinx.com/s/artic…

Servercore commands, hostname etc.

Commands hostname Rename-Computer -ComputerName NAME ライセンス認証 slmgr.vbs -ipk PRODUCTKEY slmgr.vbs -ato proxy netsh winhttp set proxy=PROXY bypass-list="LIST" network get-netipconfiguration get-netipaddress get-netipinterface new-neti…

SSL証明書作成

By powershell Short New-SelfSignedCertificate -DnsName "a.jp" -KeyAlgorithm RSA -KeyLength 2048 -CertStoreLocation "Cert:\LocalMachine\My" -NotAfter (Get-Date).AddYears(10) 上記実行後、下記を実行。 certmgr 中間証明機関→証明書にストアされて…

windows admin center

windows admin center install msiexec /i .msi /qn /L*v log.txt SME_PORT= SSL_CERTIFICATE_OPTION=generate portの標準は6516 自動的に作成された証明書は60日で期限が切れる。 既存証明書を使用する場合 msiexec /i .msi /qn /L*v log.txt SME_PORT= SME…

Enable RDP on ServerCore

ServerCore by RDP Server config SConfig Enable RDP by menu Open port netsh advfirewall firewall set rule group="remote desktop" new enable=Yes connect by rdp

petalinux

petalinux links https://dora.bk.tsukuba.ac.jp/~takeuchi/?%E9%9B%BB%E6%B0%97%E5%9B%9E%E8%B7%AF%2Fzynq%2FPetalinux%20%E3%81%AE%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%9E%E3%82%A4%E3%82%BA https://sweetcafe.jp/?*20210122-230000

centos 6 to 7 update

cat /etc/redhat-release CentOS release 6.10 (Final) 1 yum -y update アップグレード後、一旦OSを再起動します。 1 shutdown -r now OSアップグレードに必要となる「upgrade tool」のインストール OS再起動後、以下でアップグレードツールをインストール…

32bit環境をUbuntuで構築

構築手順 sudo dpkg --add-architecture i386 sudo apt-get update # You can install 32bit package like following example sudo apt-get install libc:i386