ADDS integrated Azure File Share
1. Azure vNet DNS set to ADDS DNS
2. Add Private DNS zone (Or Auto Create in Step 3.2.3)
2.1 Named: privatelink.file.core.windows.net
2.2 Add Virtual Network Link
ADDS integrated Azure File Share
1. Azure vNet DNS set to ADDS DNS
2. Add Private DNS zone (Or Auto Create in Step 3.2.3)
2.1 Named: privatelink.file.core.windows.net
2.2 Add Virtual Network Link
PowerPoint 很小氣,預設輸出圖片只有 1280x720
如果需要輸出高解析度的話必須要修改註冊機碼
微軟說明在此:
https://docs.microsoft.com/en-us/office/troubleshoot/powerpoint/change-export-slide-resolution
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\PowerPoint\Options
$Password = ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".tochararray() | sort {Get-Random})[0..15] -join ''
$Password
$Password = ("!@#$%^&0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".tochararray() | sort {Get-Random})[0..15] -join ''
$Password
for ($i=0;$i -lt 20;$i++) {
("!@#$%^&0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".tochararray() | sort {Get-Random})[0..15] -join ''
};
$ResourceGroup = "ResourceGroupName"
$SourceDiskName = "SourceDiskName"
$TargetDiskName = "TargetDiskName"
$SourceDisk = Get-AzDisk -ResourceGroupName $ResourceGroup -DiskName $SourceDiskName
$DiskConfig = New-AzDiskConfig -SourceResourceId $SourceDisk.Id -Location $SourceDisk.Location -CreateOption Copy -DiskSizeGB $SourceDisk.DiskSizeGB -SkuName "Premium_LRS"
New-AzDisk -Disk $DiskConfig -DiskName $TargetDiskName -ResourceGroupName $ResourceGroup
傳 imagemap Message Type 的圖片 URL 給 Line 的時候
Line 會用 https://xxx/Path/To/image.png/1040 取代 https://xxx/Path/To/image.png
由於我只要提供一張圖片而已不區分解析度,所以想用 mod_rewrite 的方式處理
因為不熟悉正規表達式,網路搜尋老半天後暫時只能用以下方式處理
不知道那個 /Path/To/ 要怎麼用變數取代,否則就只能寫 .htaccess 在該路徑
並把 Path/To 寫 Hard Code 進去 Orz
RewriteEngine On
RewriteRule ^(.*)/1040 /Path/To/$1 [L]
如果有人會的話竟請不吝提供 m(_ _)m
Section 1: Create Password File
# Get PasswordSection 2: Read Password File
$PassWord = Read-Host -Prompt 'Please Enter Password';
# Convert to System.Security.SecureString
$PassWord = ConvertTo-SecureString -String $PassWord -AsPlainText -Force
# Encrypt it
$Encrypted = ConvertFrom-SecureString -SecureString $Password
# Save to File
$Encrypted | Set-Content Encrypted.txt
# Read From File and Convert to System.Security.SecureString
$Password = Get-Content Encrypted.txt | ConvertTo-SecureString
先參考這篇 取得 AD 群組成員的指令 Group Members List
本篇為進階用,產生報表用
#-------------------------------------------------------
$OUFileter = 0
$UserOU = "OU=Users,DC=Contoso,DC=com"
Download mod_authnz_sspi from Here (The ApacheHaus US)
Uncompress it and copy mod_authnz_sspi.so to Apache\modules
Add Configuration in http.conf
LoadModule authnz_sspi_module modules/mod_authnz_sspi.so
快速調整 User Profile Disk 磁碟與分割區大小
紅色部份為應調整參數
$ExtendDiskSize = 16; #in GB
$DiskPartCommandFileName = ((Get-Location).Path + '\DiskPartCommand.txt');
$ExtendDiskSize = ($ExtendDiskSize*1024*1024*1024);
$VHDxs = Get-ChildItem -path 'C:\VirtualDisks\Pool' -Recurse -Filter "*.vhdx" | select FullName;
只不過想用個 Resize-VHD 指令
被罵說沒有 Hyper-V Role,但這台機器 (Azure VM) 又不支援巢狀虛擬化 (懶得去設定)
只好用指令裝起來,但要記得裝好重開機之前用第二行指令設定開機時不要跑 Hypervisor
不然應該會壞掉
dism /online /enable-feature /featurename:Microsoft-Hyper-V
bcdedit /set hypervisorlaunchtype off