How to Batch Upload things via Bat\Powershell to SFTP using WinSCP

Upload.bat[pastacode lang=”markdown” manual=”%22C%3A%5CProgram%20Files%20(x86)%5CWinSCP%5CWinSCP.com%22%20%2Fscript%3D%22C%3A%5CFTP%5CConnection.txt%22%0Aif%20%25ERRORLEVEL%25%20neq%200%20goto%20error%0A%20%0Aecho%20Upload%20succeeded%2C%20Moving%20Files%20to%20Uploaded%20folder%20or%20they%20will%20reupload%0A%0AREM%20Move%20Files%0Apowershell%20-command%20%22move-item%20%22%22%22%5C%5Cfiles%5Ctest*.csv%22%22%22%20%22%22%22%5C%5Cfiles%5CUploaded%5Ctest*.csv%22%22%22%20-Force%22%0A%0Aexit%20%2Fb%200%0A%20%0A%3Aerror%0Aecho%20Upload%20failed%2C%20keeping%20local%20files%0Aexit%20%2Fb%201″ message=”” highlight=”” provider=”manual”/]C:\FTP\Connection.txt[pastacode lang=”markdown” manual=”%0Aopen%20sftp%3A%2F%2Fusername%3Apassword%40sftp.server.com%3A22%2F%0A%23Open%20Local%20Folder%0Alcd%20%22%5C%5Cfiles%5C%22%0A%0A%23Upload%20Test*.csv%0Aput%20Test*.csv%0A%0A%0A%23%20Exit%20WinSCP%0Aexit” message=”” highlight=”” provider=”manual”/]

How to Assign Polices and Numbers Teams calling in Powershell

Connect-MicrosoftTeams[pastacode lang=”powershell” manual=”Get-CsOnlineUser%20%7C%20Where-Object%20%7B(%24_.EnterpriseVoiceEnabled%20-eq%20%22True%22)%7D%20%20%7C%20Select%20UserPrincipalName%2CTenantDialPlan%2COnlineVoiceRoutingPolicy%2CTeamsEmergencyCallRoutingPolicy” message=”How to check all users” highlight=”” provider=”manual”/][pastacode lang=”powershell” manual=”Set-CsPhoneNumberAssignment%20-Identity%20adamfowler%40contoso.com%20-PhoneNumber%20%2B61987654321%20-PhoneNumberType%20DirectRouting” message=”Assigning Numbers in Powershell” highlight=”” provider=”manual”/][pastacode lang=”powershell” manual=”Get-CsOnlineUser%20%7C%20Where-Object%20%7B(%24_.EnterpriseVoiceEnabled%20-eq%20%22True%22)%7D%20%20%7C%20Grant-CsTenantDialPlan%20-PolicyName%20%2202%20Local%22%0A%0AGet-CsOnlineUser%20%7C%20Where-Object%20%7B(%24_.EnterpriseVoiceEnabled%20-eq%20%22True%22)%7D%20%20%7C%20Grant-CsOnlineVoiceRoutingPolicy%20-PolicyName%20%22XXXXXX%22%0A%0AGet-CsOnlineUser%20%7C%20Where-Object%20%7B(%24_.EnterpriseVoiceEnabled%20-eq%20%22True%22)%7D%20%20%7C%20Grant-CsTeamsEmergencyCallRoutingPolicy%20-PolicyName%20%22xxxxx.teams.com.au%22%0A” message=”How to assign users DialPlan\VoiceRoutingPolicy and EmergencyCallRoutingPolicy” […]