Import-Module activedirectory
$StartDate=(GET-DATE)$botkey = "239344565:BBFMrU3BhBC0HeHfAhl09ThqngQD_i_aevA"
$str_help = @"available commands:/Users (Starts script to import users from 1C csv file)/CreateUser (Creats new user. Mandatory parameter "Famil Name Midname")/finduser (Lists users accounts, possible sirch in "en" and "ru")/AddMailToUser (Add exchange mail account to username)/cisco (Restarts port on router, example "/cisco 10.1.10.7 fa0/23")/CopyUserGroups (copy group memberoff from first to second account vasileva_vv vasilev_vv)/Help (Displays this help)"@$getMeLink = "https://api.telegram.org/bot$botkey/getMe"$sendMessageLink = "https://api.telegram.org/bot$botkey/sendMessage"$forwardMessageLink = "https://api.telegram.org/bot$botkey/forwardMessage"$sendPhotoLink = "https://api.telegram.org/bot$botkey/sendPhoto"$sendAudioLink = "https://api.telegram.org/bot$botkey/sendAudio"$sendDocumentLink = "https://api.telegram.org/bot$botkey/sendDocument"$sendStickerLink = "https://api.telegram.org/bot$botkey/sendSticker"$sendVideoLink = "https://api.telegram.org/bot$botkey/sendVideo"$sendLocationLink = "https://api.telegram.org/bot$botkey/sendLocation"$sendChatActionLink = "https://api.telegram.org/bot$botkey/sendChatAction"$getUserProfilePhotosLink = "https://api.telegram.org/bot$botkey/getUserProfilePhotos"$getUpdatesLink = "https://api.telegram.org/bot$botkey/getUpdates"$setWebhookLink = "https://api.telegram.org/bot$botkey/setWebhook"
$offset = 0
while($true) { $json = Invoke-WebRequest -Uri $getUpdatesLink -Body @{offset=$offset} | ConvertFrom-Json $l = $json.result.length $i = 0 while ($i -lt $l) { $offset = $json.result[$i].update_id + 1 $date = get-date "1/1/1970" $EndDate = $date.AddSeconds($json.result[$i].message.date).ToLocalTime() if((NEW-TIMESPAN –Start $EndDate –End $StartDate).TotalSeconds -le 2){ switch($json.result[$i].message.text.split(' ')[0]){ '/users' { start-process powershell.exe N:\scripts\Create_ADUsers_CSV_File.ps1 } '/CreateUser' { start-process powershell.exe $str_param } '/AddMailToUser' { start-process powershell.exe "N:\scripts\add_mail_to_user_command_line.ps1 -user_id $str_UserId" } '/CopyUserGroups' { start-process powershell.exe $str_param } '/finduser' { start-process powershell.exe $str_param
} '/Help' { start-process powershell.exe $str_param
} '/?' { start-process powershell.exe $str_param
} '/cisco' { start-process powershell.exe "n:\scripts\reboot_cisco_port.ps1 -cisco_ip $bot_ip -cisco_port $bot_port"
} } } $i++ } Start-Sleep -s 2}--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/77581331-9972-42d5-a489-1cc2d7426475%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/CAKOCCC76WG1PaZAdpuy%2BwCepX-L%3DKuXY4-OHJVn9i%3DKmjWMZYQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/CAKOCCC6EoFqRMdOpYB1BW4bxZrRdeOdtymq2w_Ugwwo%2B4Gy4fg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/CAKOCCC5KQZ6K%2Ba_VgPykFLSijfRPL_rxUMFP2Hbv0JAmO7_bGA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/CAKOCCC6dKgrEGyUvxOwV36Az%3DnSoKRYz4_6RJ4L8vjkRnHQFMg%40mail.gmail.com.
--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/SB6chOsj2sE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/CAMLDvsf_mj-Q62uHxf%3Dio3vgAeriqBs6MMKO%2Bpqk%3DEh-uMvbLA%40mail.gmail.com.
Dear Flavio,I apologize; I forgot to see there, thanks a lot for explanation.Now it looks like more clear than before :-)
Hi Lorenzo
I didn't try yet to integrate it into souliss sketch.
Could you please send me your test sketch to be able to duplicate this experience, thanks ?
Domenico
Bel lavoro Lorenzo!
From Mobile.
--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/39031b57-ceb9-426b-89f8-10c2f8a509f6%40googlegroups.com.
Mi associo anche io!
Super! !
I tested it and looks like you said.
☺
Not really, try with @PliniosHomeBot you will have access but you will not see any command. Because it answer only on the group that I've created.
You can use the Keyboard feature to avoid any typing.
Dario.
From Mobile.
--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/08a0ca37-80e2-4dd2-be0c-71368c4882ad%40googlegroups.com.