42 lines
1.1 KiB
PowerShell
42 lines
1.1 KiB
PowerShell
function SayHello
|
|
{
|
|
param (
|
|
[string]$Name
|
|
)
|
|
Write-Host "Hello, $Name!"
|
|
}
|
|
|
|
# 调用函数
|
|
SayHello -Name "Test PowerShell"
|
|
|
|
function SetMinioAlias
|
|
{
|
|
mc.exe alias set local http://10.250.0.100:9000 cmii B#923fC7mk
|
|
mc.exe alias set tc-sh http://42.192.52.227:9000 cmii B#923fC7mk
|
|
mc.exe alias set seoul-1 https://cnk8d6fazu16.compat.objectstorage.ap-seoul-1.oraclecloud.com aed62d24d85e2da809ce02bf272420ba4ed74820 rQdEcn69K049+JkA1IGoQmC1k8zma8zfWvZvVS0h144=
|
|
}
|
|
|
|
SetMinioAlias
|
|
|
|
# 获取当前工作目录
|
|
$currentDirectory = Get-Location
|
|
# 打印当前工作目录
|
|
Write-Host "Current directory: $currentDirectory"
|
|
Write-Host ""
|
|
|
|
# 获取当前目录的所有文件名
|
|
$files = Get-ChildItem -Path $currentDirectory -Recurse -File -Name
|
|
|
|
# 遍历并打印文件名
|
|
foreach ($file in $files)
|
|
{
|
|
Write-Output $currentDirectory\$file
|
|
Write-Host ""
|
|
mc.exe cp $currentDirectory\$file local/octopus/
|
|
mc.exe cp $currentDirectory\$file tc-sh/octopus/
|
|
mc.exe cp $currentDirectory\$file seoul-1/seoul/
|
|
Write-Host ""
|
|
}
|
|
|
|
Write-Host ""
|
|
Write-Host "Octopus Agent all dependency file has been synchronized!" |