AHV - down load file & folder from all node in cluster (powershell & pscp)


Simple script for download specific file or folder in every node
(put pscp.exe and .ps1 in same path )

----------------------------------------
$cluster=0,"cvmip1","cvmip2"
$path= split-path -parent $MyInvocation.MyCommand.Definition

for ($i=1;$i -le nodenumber;$i++){
mkdir .\node$i #folder for save file

$ahvhostfile="nutanix@"+ $cluster[$i] + ":/home/nutanix/data/logs/preupgrade.out"
& "$path\pscp.exe" -pw "nutanix/4u" $ahvhostfile $path\node$i\

$ahvhostfile="nutanix@"+ $cluster[$i] + "/home/nutanix/data/logs/genesis.out*"
& "$path\pscp.exe" -unsafe -pw "nutanix/4u" $ahvhostfile $path\node$i\

$ahvhostfile="nutanix@"+ $cluster[$i] + "/home/nutanix/data/logs/sysstats"
& "$path\pscp.exe" -unsafe -r -pw "nutanix/4u" $ahvhostfile $path\node$i\

}

----------------------------------------

留言

這個網誌中的熱門文章

Easy way for Try out o365 E3 - Step2 - Install Azure AD connect sync AD account to o365

AHV - migrate all VM on one node to other node

Win7 RSAT & 2003R2 ADWS