Microsoft Flow
5 TopicsStarting a PA Flow from a script
I'm following: https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-trigger-flow-tutorial to the letter. And it's not triggering the flow. #Define the parameters for the branding: $themeName = "SiteTemplateBrandingFlowv5" $site_script = @' { "$schema": "schema.json", "actions": [ { "verb": "triggerFlow", "url": "https://prod-105.westeurope.logic.azure.com:443/workflows/a8609dd2abb14c5gac1183be13ef0099/triggers/manual/paths/invoke?api-version=2016-06-01", "name": "Record site creation event", "parameters": { "event": "site creation", "product": "SharePoint Online" } } ], "bindata": { }, "version": 1 } '@ Connect-SPOService -Url "https://mydomain-admin.sharepoint.com" -Credential $credentials $addSiteScript = Add-SPOSiteScript -Title $themeName -Content $site_script -Description "Communication site which removes data export for modern experience and adds branding." Write-Host $addSiteScript.Id Add-SPOSiteDesign -Title $themeName -WebTemplate "68" -SiteScripts $addSiteScript.Id -Description "" The flow is just not triggering as mentioned, can anyone see something wrong above. I've used 2 different accounts to create the flow.370Views0likes1CommentUpload Sharepoint File Online and Share using Powershell Script
Hello friends, To summarize: I receive data from a MySQL table and it is processed via Powershell. This processing generates a CSV file. This file, the Powershell Script itself, uploads to a Sharepoint Online library. What I think - Two possibilities: 1) Or send the file to whoever requests it directly by email, and for this I would like to use the Script code for this; OR 2) When uploading to a Sharepoint Online library, sharing for those who request it automatically upon execution. Contextualizing: We receive many requests for Auditing shares or in shared boxes, PO boxes, OneDrive or SharePoint sites. Each request from this was initially a manual action. Now a form that receives the request. The data from this form fills a table, which is consulted by a Powershell script and carries out the processing, generating the result with this file locally. This part of the "local file" still requires us to return it to the requestor manually. What we want is to make this last step automatic, If so, is there any script or code suggestion for this? Thank you very much for everyone's attention Big HugsSolved1.9KViews0likes4CommentsAny way we can tag only some set of people in a private channel in teams through power shell?
as we cant create tags in a private channel in teams, and since I can only create a limited no of private channels in a team, that's why I need to tag those specific people in an already created private channel, and those are 60-70 people, so I can't tag them one by one.379Views0likes0CommentsCreate an item in a Sharepoint list from a Powershell script
Hello, I have a Sharepoint listing called "Membres" on one of my sites. I would like to create a new item in this list from a PowerShell script but I can't. This tells me an error. Here is the script I am using: #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Set Config Parameters $SiteURL="https://cgigodev.sharepoint.com/sites/TeletravailCGIGO" $ListName="Membres" Try { #Get Credentials to connect $Cred= Get-Credential #Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) #Get the List $List=$Ctx.Web.Lists.GetByTitle($ListName) #sharepoint online powershell add list item $ListItemInfo = New-Object Microsoft.SharePoint.Client.ListItemCreationInformation $ListItem = $List.AddItem($ListItemInfo) #Set Column Values $ListItem["Title"] = "A" $ListItem["Manager"] = "A" $ListItem["Lundi"] = "Télétravail" $ListItem["Mardi"] = "Télétravail" $ListItem["Mercredi"] = "Télétravail" $ListItem["Jeudi"] = "Télétravail" $ListItem["Vendredi"] = "Télétravail" #Apply changes to list $ListItem.Update() $Ctx.ExecuteQuery() Write-host -f Green "New Item has been added to the List!" } Catch { write-host -f Red "Error:" $_.Exception.Message } And here is the error it gives me: applet de commande Get-Credential à la position 1 du pipeline de la commande Fournissez des valeurs pour les paramètres suivants : Error: Exception lors de l'appel de « ExecuteQuery » avec « 0 » argument(s) : « Des données non valid es ont été utilisées pour mettre à jour l'élément de liste. Le champ que vous essayez de mettre à jou r est peut-être en lecture seule. » Could you help me please ? 😞 Thank you in advance !2.1KViews0likes1CommentPowershell downloads the login webpage html instead of a file
Hello I have a website.com where I login via a form and it has a second step authentication too. After I fully login, a session starts and I can type a specific url in the address bar of IE/Edge and it will trigger a download of an xlsx file. I want to get these files every 30 min and I was checking Powershell as other options are limited. However, using Invoke-WebRequest results in downloading the login webpage html instead of the file. Any idea? Also, do you know any other method to get these files regularly so that the session renews? It is impossible to automate the login as it requires a mobile phone. An API is paid so again it's not an option. Also, tried a Data Connection in Excel but it does download the same html. Thanks!3.1KViews0likes1Comment