Search
 
SCRIPT & CODE EXAMPLE
 

POWERSHELL

powershell scriptblock return variable

$server1 = "dc-1"

$server2 =  'dc-2' 

$server3 =  'app' 

$computers = ( $server1, $server2, $server3 ) 


$result3 = Invoke-Command -Credential $domaincredentials -ComputerName $computers -ScriptBlock { 

$SB = {
$objht = @{} 
$objht.Testa = 'testa'
$objht.Testb = 'testb'
$objht.Testc = 'testc'
New-Object psobject -propertyh $sb
}
}

write-host $result3
Comment

PREVIOUS NEXT
Code Example
Gdscript :: godot check if object is in group 
Gdscript :: godot get root node 
Gdscript :: godot make string all uppercase 
Gdscript :: gdscript variables 
Clojure :: Clojure defn 
Clojure :: Clojure whitespace 
Abap :: sap checkbox abap 
Cobol :: Cobol reverse a string 
Assembly :: json vulnerabilities 
Assembly :: assembly print 
Assembly :: assembly language loop example masm 
Assembly :: datauristring pdf open in php 
Assembly :: fatal error: opencv2/core/version.hpp: No such file or directory 
Javascript :: jquery vslidation remove spaces from input 
Javascript :: jquery disable input 
Javascript :: regex cpf 
Javascript :: setinterval jquery 
Javascript :: align image center react native 
Javascript :: get parameter from the actual url javascript 
Javascript :: update node.js dependencies 
Javascript :: How disable button jquery 
Javascript :: react native password input 
Javascript :: You seem to not be depending on "@angular/core" and/or "rxjs". This is an error. 
Javascript :: jquery datepicker no weekends 
Javascript :: remove punctuation marks from string js 
Javascript :: js reload iframe 
Javascript :: how to color console.log 
Javascript :: disable all element in div angular 12 
Javascript :: convert hexadecimal to decimal js 
Javascript :: intval js 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =