After build up the SoftEther VPN https://youtu.be/Y1F4PJOsWF8
You can manually Import the Certificate
Place Cert in C:\Cert\ and write a TXT file (C:\Cert\SoftEtherVPNCertBatch.txt) with the following command:
After build up the SoftEther VPN https://youtu.be/Y1F4PJOsWF8
Place Cert in C:\Cert\ and write a TXT file (C:\Cert\SoftEtherVPNCertBatch.txt) with the following command:
這會把一些中文全形標點符號也過濾掉
$Name = '[😀😃😄😁😆]';
這個應該是用不到啦,畢竟就已經跟網域脫離關係,應該是用 Cache Credential 來登入作業系統
所以應該不會遇到 Computer Account Password 說過期,失去網路信任關係的問題
但如果有需要的話,VPN 先連上,然後下 PowerShell 指令
Test-ComputerSecureChannel -server DC.Contoso.com -credential Contoso\Adminstrator -repair
User 在家工作一段時間
遇到密碼過期或因為需要取得帳號 Member Of 屬性
而需要在已經連接網域網路的情況下重新登入作業系統
先以 Local Account 登入作業系統
再以 Windows 內建的 VPN,或 SoftEther VPN 也可以,連接好之後
敲 Command: tsdiscon 切換帳號 (Switch User)
這時 VPN 連線會持續存在,但可以換 AD Domain User Account 登入了
此時就能變更密碼、取得最新的 Momber Of 資訊及 GPO 等
只需要開啟 Android 的 USB 偵錯模式
再透過 Scrcpy 就能讓你在 PC 上連接 Android 裝置並顯示、操作
甚至可以透過無線網路來連接 (adb 內建功能)
以下為快速連接的 PowerShell Script
只要先指定好 adb.exe 及 scrcpy.exe 的 Path 就可以運作
達到快速連接的目的
$ADBPath = 'C:\scrcpy\adb.exe';
$ScrcpyPath = 'C:\scrcpy\scrcpy.exe';
$ConnectedDevices = @();
$ConnectionPrompt = '';
$ConnectionTargetIndex = 0;
$Reconnect = 'y';
Connect To Teams 的段落搭配
https://blog.dino9021.com/2020/11/connect-azaccount-with-saved-encryped.html
$ShowID = $True;
##### Get Self-Path #####
if (($MyInvocation.MyCommand).Path -ne $Null) {
$SelfPath = (($MyInvocation.MyCommand).Path -replace ($MyInvocation.MyCommand),' ');
} else {
$SelfPath = ((Get-Location).Path + '\');
};
##### Get Self-Path #####
#$webclient=New-Object System.Net.WebClient
#$webclient.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
#[Net.ServicePointManager]::SecurityProtocol = "tls12"
#Install-Module MicrosoftTeams
Azure 上面起一個 Windows VM 的 OS Disk 預設是 127GB
但通常用不到那麼大卻要負擔那麼多的租金
在以下網址找到可以縮小 OS Disk 的 PowerShell Script
https://github.com/jrudlin/Azure/blob/master/General/Shrink-AzDisk.ps1
需要注意 Script 的預設情況 Disk 是 沒有設置 Available Zone 的
以下 Script 已經將 Disk 的 Available Zone 加入避免錯誤
Windows Server 2019 的 NPS 有 RADIUS Server 服務設定
但即使完成了正確的設定,RADIUS Client 仍然無法正確取得驗證
如果此時將 Firewall 關閉則可以正確驗證
顯然問題出在防火牆上
解決辦法下一行 PowerShell 指令即可
Get-NetFirewallRule -DisplayGroup "Network Policy Server" | where DisplayName -like "*RADIUS*" | Set-NetFirewallRule -Service Any
$String = 'SString1T<String2>';
$Find = [Regex]::Matches($String, "(?<=S).+?(?=T)");
for($i = 0; $i -lt $Find.Count; $i++) {
$Find[$i].Value;
};
$Find = [Regex]::Matches($String, "(?<=\<).+?(?=\>)");
for($i = 0; $i -lt $Find.Count; $i++) {
$Find[$i].Value;
};
又踩到雷啦!
用 PowerShell Invoke-WebRequest 向某個網站發出 Request 的時候出現錯誤:
The server committed a protocol violation. Section=ResponseStatusLine
在 Invoke-WebRequest 之前先執行以下 Script: