This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
$results = Invoke-Command -ComputerName localhost -Authentication Credssp -Credential $credential -ScriptBlock { | |
$exitCode = 0 | |
$output = @() | |
try { | |
$output += "Copying files..." | |
Copy-Item "$Using:workspace\AMERICAS\Netlogon\*.*" \\USDC4\NETLOGON -Force -ErrorAction Stop | |
Copy-Item "$Using:workspace\APAC\Netlogon\*.*" \\SGDC2\NETLOGON -Force -ErrorAction Stop | |
Copy-Item "$Using:workspace\EMEA\Netlogon\*.*" \\UKDC3\NETLOGON -Force -ErrorAction Stop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$days = 'MON,TUE,WED' | |
$dayCodes = $days.Split(',') | .{ | |
process { | |
switch($_){ | |
'SUN' {1} | |
'MON' {2} | |
'TUE' {4} | |
'WED' {8} | |
'THU' {16} |