Can i add progress bar to $xmlac.Send() ??



i want add progress bar below code.this powershell script connect ssas analysis server engine , deploy cubes.while coming to $xmlac.send($query, $properties) line deployment progress has begin starting.it's taking minimum 3 minutes maximum 1 hour complete single cube deployment progress.i want know percentage of completed deployment process , remaining hours/minutes deployment.

i searched through internet.but couldn't find proper solution scenario.please me resolve issue. 


$cwd = get-location
[system.io.directory]::setcurrentdirectory($cwd)
$query = get-content $args[1]

[system.reflection.assembly]::loadwithpartialname("microsoft.analysisservices.xmla") 
[microsoft.analysisservices.xmla.xmlaclient]$xmlac = new-object microsoft.analysisservices.xmla.xmlaclient 
$xmlac.connect($args[0]) 
write-host ("connected " + $args[0])

$xmlresult = ""
$properties = new-object "system.collections.generic.dictionary``2[[system.string, mscorlib, version=2.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089],[system.string, mscorlib, version=2.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089]]"

$xmlac.send($query, $properties)
$xmlac.disconnect()

write-output $xmlresult

thanks 

regards,

yosuva

hi yosuva,

thanks posting here.

>>i want know percentage of completed deployment process , remaining hours/minutes deployment

we consider using write-process command this.

for more information using cmd, please type help write-process -full on powershell console.

below example of adding write-process command on script:

https://gallery.technet.microsoft.com/scriptcenter/get-computerinfo-query-23dd6042

best regards,


andy_pan

please mark reply answer if find helpful. if have feedback technet support, contacttnmff@microsoft.com.




Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Edit Group Policy

Hyper-V VM not reaching OS 'Logon' screen

DNS question...