Hello! The script you reference is providing instructions on adding a FOLDER to a Sharepoint library. I'm interested in adding a task item to an existing Sharepoint list. Here's an example of a script that I'm trying to run that fails trying to add a PPSnapin to Sharepoint:
Import-Module Adaxes
if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null) {
Add-PSSnapin Microsoft.SharePoint.PowerShell
}
try
{
$SPWeb = Get-SPWeb "https://wakecountync.sharepoint.com/sites/AppDevTeam/"
$List = $SPWeb.Lists["WR"]
$newItem = $List.items.add()
$newItem["Task Name"] = "Adaxes - Test"
$newItem["Assigned To"] = "Sandra Mitchell"
$newItem["Requesting Dept/Div/Team"] = "IS"
$newItem["Requested By"] = "Fred Flintstone"
$newItem.update()
$SPWeb.Dispose();
}
catch
{
}