#ProjectOnline Project Center updates #O365 #PPM #PMOT #MSProject
|
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011. I am also a certified Prince2 Practitioner. This article has been cross posted from pwmather.wordpress.com (original article) |
Further to the announcement the other week regarding great improvements coming to Microsoft’s Office 365 PPM tool Project Online : http://bit.ly/2nQpAJx
You may have noticed that on your Project Online PWA instance you now have two new checkbox options on the Project Center Projects ribbon to improve page load times if needed:
A small change but one that will help improve page load times for users.
Dynamically selecting one or more approvers as participants in a “Start a task process” action in Nintex workflows for Office 365
How can I dynamically select the participants/approvers in a parallel task approval process in Nintex Workflows for Office 365?
I recently created a solution where our customer wanted a task approval process to be sent to multiple users based on a user’s selection of an area of responsibility. For example if selecting the “Finance” department the approval task may be sent to Jon Smith and Jane Doe. However, if the “HR” department was selected then the approvals may go out to Fred Young and Joe Mandoza. The departments and their approvers exist in a SharePoint list. In this post I’ll describe how I solved this problem. I hope you find it useful and that it saves you much heart ache.
Creating the Department Approvers list.
First, let’s create a SharePoint list that contains a column for the department (single line of text) and one for the approver (person).
I filled in some data so that if I select the Finance department then two approvers ,Clements, Chris and Chris Clements will be selected and added as participants in the task process.
Creating the primary list.
Next, let’s create a list to which we will attach our Nintex workflow. This list will have one lookup column that will be linked to our Department Approvers list. Let’s call our primary list, Quarterly Reports.
Here is what the new item form looks like. Note the look up column displaying the available departments from Department Approvers.
Creating the “Start Approval Task Process” workflow.
Start by creating a new list workflow on the Quarterly Reports list. Call the workflow Get Approvals.
Step 1: Query the list to get the approvers based on the selected department.
Use the query list action with the following configuration:
We are going to select the approver column from this Department Approvers list where the department column matches the selected department on the quarterly reports list. Configure the action as shown below.
Note that we are selecting the “User Name” property of the approver column. In Office 365 this will be the person’s E-mail address. Also notice that I created a workflow variable of the collection type, colDepartmentApprovers to store the results in.
Step 2: Transform the colDepartmentApprovers variable into a dictionary
If you were to run the workflow now and observe the contents of the colDepartmentApprovers variable you would see that its format is that of a JSON object called “Approver” which contains an array of “UserName” key value pairs.
[{"Approver":[{"UserName":"Chris.Clements@mydomain.com"},{"UserName":"cleme_c@mydomain.com"}]}]
But look closely at the leading and trailing brackets []. This means that this is an array of JSON approver objects each with its own array of key value pairs.
We need to crack open this string to get at the E-mail addresses inside but it is going to take several steps to get there so grab a beer and chill.
Let’s add the “Get Item from Collection” action.
Configure the action as shown below:
Notice that I hard-coded the 0 index counter. This means that I will always fetch the first item in the collection. I realize that if a user were to create a second record for the “finance” department in the department approvers list that this workflow would not pull in the approvers listed in that row. To handle that case we would need to loop across the colDepartmentApprovers variable. However, to keep this post concise I will only handle one row of approvers per department.
In the output section of this action I created a workflow variable called “dicDepartmentApprovers“. This variable will hold whatever was in the first position (the 0 index) of the colDepartmentApprovers variable.
Let’s run the workflow again and check out the contents of dicDepartmentApprovers.
{"Approver":[{"UserName":"Chris.Clements@mydomain.com"},{"UserName":"cleme_c@mydomain.com"}]}
We were successful at pulling the first and only “Approver” row from the collection. The leading and trailing brackets “[]” are gone! Now we need to get at the array of key value pairs containing the E-mail addresses.
Step 3: Parse the Approver object into a dictionary
Let’s add the “Get an Item from Dictionary” action.
Configure the action as show below:
In this step I am selecting the “Approver” path from the dictionary called dicDepartmentApprovers however, I insert the resulting data back into the collection variable. What’s going on here? Let’s run the workflow again and see what the data in the colDepartmentApprovers variable looks like.
[{"UserName":"Chris.Clements@mydomain.com"},{"UserName":"cleme_c@mydomain.com"}]
Hopefully you see that we are again dealing with an array/collection of data. Selecting the “Approver” value from the dictionary in yields a collection of “UserName” values. This time we are going to loop across this collection and crack out the individual E-mails.
Step 5: Looping across the colDepartmentApprovers collection
Add the “For Each” action.
Configure the action as shown below:
I specified our collection variable, colDepartmentApprovers, as the input collection across which we are going to loop. For the output variable I created a new workflow variable called “dicUserName“. This variable holds the currently enumerated item in the collection. In other words, it is going to hold a single instance of the “Username” key value pair each time through the loop. Its value will look something like this on the first trip through the loop: {"UserName":"Chris.Clements@mydomain.com"} and then it will look like this: {"UserName":"cleme_c@mydomain.com"} during it’s second loop.
Given that the value of the dicUserName is dictionary we can use the “Get an Item from Dictionary” and specify the “UserName” path to arrive at the E-mail address. Let’s take a look.
Add the “Get and Item from Dictionary” action. Be sure to place this action inside of the for each looping structure.
Configure the action as shown below:
Again we use the Item name or Path setting to retrieve the value. In this case we set “UserName” and save the results into a new workflow variable called txtApproverEmail. Its contents look like this:
VICTORY! Well, almost. Remember we want to our approval task to go out to both E-mail addresses at once. We are going to need to concatenate our E-mail addresses into a format that is acceptable to the “Start a task process” action.
Let’s add the “Build String” action.
Configure the Action as shown below:
In this action I am stringing together our E-mail address with a new, empty workflow variable called txtCombinedApproverEmail. I take the result of the concatenation and run it back in the txtCombinedApproverEmail variable. It works like this:
First time through the loop where txtApproverEmail = “chris.clements@mydomain.com” and txtCombinedApproverEmail is empty.
chris.clements@mydomain.com;
The second time into the loop where txtApproverEmail = “cleme_c@mydomain.com” and txtCombinedApproverEmail = “chris.clements@mydomain.com;”
cleme_c@mydomain.com;chris.clements@mydomain.com;
PRO TIP: Notice that there is NO space between the E-mail addresses and the semicolon. You are warned.
Step 6: Beginning the Approval Task
Finally, we are at the last step. That is to create the “Start a Task Process” action and assign our txtCombinedApproverEmail in the Participants field. Remember to create this action outside of the for each loop.
And the configuration:
All that I am really concerned with here is setting the participants field to my workflow variable txtCombinedApproverEmail. Let’s run the workflow and see if we get our task assigned to two approvers at once based on our selected “Finance” department.
Ah, and there you have it:
This is the entire workflow I created in this post:
Closing Thoughts
I have to be honest. This feels like it shouldn’t be this hard to do in a tool such as Nintex for Office 365. Seven steps? Really? If I were a “citizen developer” there is no way I could have pulled off a task like this. Knowledge of JSON encoding is essential.
Chris
|
I am a senior software developer and development team lead in Houston Texas. I am passionate about the “art” of software development. I am particularly interested in software design patterns and the principles of SOLID object-oriented code. I am an evangelist for test driven development. I love to think and write about my day-to-day experiences in the trenches of enterprise IT. I relish the opportunity to share my experiences with others.
From the wire to the presentation, I am holistic solutions guy. I have broad experience in client side technologies such as Javascript, Ajax, AngularJS, Knockout, and Bootstrap. I have extensive experience with MVC, MVVM, and ASP.NET Web Forms. I am strong in SQL Databases, performance tuning, and optimization. I also have a background in network engineering, wide-area and inter-networking. This article has been cross posted from jcclements.wordpress.com/ (original article) |
#ProjectServer and #SharePoint 2013 / 2016 April 2017 Cumulative Update #PS2013 #SP2013 #PS2016 #SP2016 #MSProject
|
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011. I am also a certified Prince2 Practitioner. This article has been cross posted from pwmather.wordpress.com (original article) |
The Office 2016 April 2017 updates and cumulative updates are now available, please see the links below:
Project 2016 April 2017 update:
http://bit.ly/2o1aAXu
SharePoint Server 2016 / Project Server 2016 April 2017 update:
http://bit.ly/2owBFWn & http://bit.ly/2o1kgRH
The Office 2013 April 2017 updates and cumulative updates are now available, please see the links below:
Project Server 2013 April 2017 CU Server Roll up package:
***No Server rollup package this month – install other SharePoint 2013 patches as required***
Project Server 2013 April 2017 update:
http://bit.ly/2ownFfq
Project 2013 April 2017 update:
http://bit.ly/2o12BtK
Also worth noting, if you haven’t done so already, install Service Pack 1 http://bit.ly/1uorn2C first if installing the April 2017 CU on 2013.
As always, fully test these updates on a replica test environment before deploying to production.
#ProjectOnline issue with #PowerBI and the #OData URL with [] now fixed #PPM #BI #PMOT
|
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011. I am also a certified Prince2 Practitioner. This article has been cross posted from pwmather.wordpress.com (original article) |
Just a quick post to highlight that the issue with setting the credentials for a Project Online OData connection that contained the [] for localisation is now fixed in the Power BI Service. If your OData URL contained the [] to specify the OData localisation you couldn’t set the credentials in the Power BI Service for the data refresh, you would see the error below.
For the details on the error see a previous post of mine, see the Note halfway down the post: http://bit.ly/2l2u5kS
It’s good to finally have this issue fixed in Power BI. The Project Online Power BI report pack I created will now refresh / work as expected in the Power BI Service: http://bit.ly/2ivjxct
Awesome update for #ProjectOnline – create and manage up to 30000 projects #PPM #O365 #PMOT #MSProject
|
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011. I am also a certified Prince2 Practitioner. This article has been cross posted from pwmather.wordpress.com (original article) |
A new announcement on the Office blog today detailed some changes to Microsoft Office 365 PPM tool, Project Online. It will be possible to create and manager up to 30,000 projects. This is a great news as the 5,000 limit was an issue for some organisations. What is also coming is the ability to have a project site for each project, the limit previously was 2,000 project sites. This is achieved by setting the site collection to host the project sites per EPT as the limit per site collection is 2,000 sites. Be aware though, with the new solution the user sync and task list sync is only supported for Project Sites that exist in the same site collection as the PWA site.
There are also some new options in the project center to improve the performance for page load times when you have lots of projects by turning off the data roll up and Gantt charts.
For details see the blog post here: http://bit.ly/2ov25sx
The Project Online software boundaries and limits article has been updated: http://bit.ly/2nXhYU2
The article on tuning Project Online performance has also been updated with the new options: http://bit.ly/2ov4jrX
#ProjectOnline – 1 PWA site collection for all or 1 per department? #O365 #PPM #PMOT #Office365 #MSProject
|
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011. I am also a certified Prince2 Practitioner. This article has been cross posted from pwmather.wordpress.com (original article) |
A question I hear a few times from organisations is “We have a new department or business unit coming on-board with Project Online, do we need a new PWA instance for them or can we use the one we already have?” The answer isn’t normally a straightforward yes or no. This post aims to cover most of the questions you need to ask when considering using the existing PWA site collection or creating a new one for a new department / business unit.
The first thing to consider is the Project Online limitations for the data such as number of projects per PWA site, check out the limits here: http://bit.ly/2nXhYU2. Check how many projects you currently have in the PWA site collection and how many more the new business unit expect to add into the PWA site collection – if you are going to be reaching the limits on a PWA site collection then consider a dedicated PWA site collection for the new business unit. The number of PWA site collections in each Office 365 tenant will not be an issue – you can have up to 9,999. Just because you can have lots of PWA site collection doesn’t automatically mean the answer is a new PWA site collection each time!
One PWA site collection will support different PWA configurations for each business unit or department (custom fields , Enterprise Project Types etc.) by making use of the Department functionality to separate those configuration items. So for example, the R&D department only see configuration items relevant to them. So if the new business unit has different custom field / EPT requirements, that shouldn’t be a problem using a single PWA instance.
Whilst talking about configuration items, there are some items that are at the PWA site collection level that can’t be configured / tailored to each business unit or department. These would be some of the Time and Task Management options such as Time Reporting Periods, Timesheet settings and Task settings. Also some settings under the Operational Policies such as Additional Server Settings. If the new business unit has different requirements for time capturing they would need a dedicated PWA instance.
Another important aspect to consider is – will these different business units require access to the same enterprise resources to assign to tasks? Will they need to view the true resource demand / availability for these resources in one place? If this is the case then the easiest option is for the new business unit to use the same PWA site collection.
If there is a requirement to see the data from each business unit together in PWA, for example in a project center view then a single PWA site collection would be required. Similarly, if both business units projects needed to be included in the organisations portfolio strategic analysis for cost and resource requirements, a single PWA site collection will be required.
Reporting is another key factor, if the reports need to show data from all business units / departments then a single PWA instance is easier but it is still possible to generate reports that use data from multiple PWA site collections. With multiple PWA site collections this is something that can be worked around providing there was common metadata between the PWA site collections to enable projects from both PWA site collections to be viewed in the same report.
Then there is the management of the PWA site collection/s. It might be that the organisation has a central PMO function that administers the PWA site collection – adding another PWA site collection will increase their workload.
This is by no means an exhaustive list, here are just a few of the things to consider when deciding on using the existing PWA site collection or a new PWA site collection when a new business unit / department are coming on board.
#ProjectServer and #SharePoint 2013 / 2016 March 2017 Cumulative Update #PS2013 #SP2013 #PS2016 #SP2016 #MSProject
|
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011. I am also a certified Prince2 Practitioner. This article has been cross posted from pwmather.wordpress.com (original article) |
The Office 2016 March 2017 updates and cumulative updates are now available, please see the links below:
Project 2016 March 2017 update:
http://bit.ly/2nnzxAE
SharePoint Server 2016 / Project Server 2016 March 2017 update:
http://bit.ly/2msrNZ7 & http://bit.ly/2nnFJc0
The Office 2013 March 2017 updates and cumulative updates are now available, please see the links below:
Project Server 2013 March 2017 CU Server Roll up package:
http://bit.ly/2nnFH3S
Project Server 2013 March 2017 update:
http://bit.ly/2msrQ7f
Project 2013 March 2017 update:
http://bit.ly/2nnpaN5
Also worth noting, if you haven’t done so already, install Service Pack 1 http://bit.ly/1uorn2C first if installing the March 2017 CU on 2013.
As always, fully test these updates on a replica test environment before deploying to production.
Rebuild and Reorganize indexes on all tables in MS database
As part of database maintenance, indexes on databases have to be rebuilt or reorganised depending on how fragmented the indexes are. From the article Reorganize and Rebuild Indexes, the advice is to reorganise index if avg_fragmentation_in_percent value is between 5 and 30 and to rebuild index if it is more than 30%.
The script below queries all fragmented indexes more than 5 percent and using a cursor a loop is performed on the results to rebuild or reorganise indexes depending on the percentage of fragmentation using dynamic SQL, i.e.
The script can be downloaded from technet gallery , i.e. if avg_fragmentation_in_percent value is between 5 and 30 then reorganise else rebuild.
declare @tableName nvarchar(500)
declare @indexName nvarchar(500)
declare @indexType nvarchar(55)
declare @percentFragment decimal(11,2)
declare FragmentedTableList cursor for
SELECT OBJECT_NAME(ind.OBJECT_ID) AS TableName,
ind.name AS IndexName, indexstats.index_type_desc AS IndexType,
indexstats.avg_fragmentation_in_percent
FROM sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL, NULL) indexstats
INNER JOIN sys.indexes ind ON ind.object_id = indexstats.object_id
AND ind.index_id = indexstats.index_id
WHERE
-- indexstats.avg_fragmentation_in_percent , e.g. >30, you can specify any number in percent
indexstats.avg_fragmentation_in_percent > 5
AND ind.Name is not null
ORDER BY indexstats.avg_fragmentation_in_percent DESC
OPEN FragmentedTableList
FETCH NEXT FROM FragmentedTableList
INTO @tableName, @indexName, @indexType, @percentFragment
WHILE @@FETCH_STATUS = 0
BEGIN
print 'Processing ' + @indexName + 'on table ' + @tableName + ' which is ' + cast(@percentFragment as nvarchar(50)) + ' fragmented'
if(@percentFragment<= 30)
BEGIN
EXEC( 'ALTER INDEX ' + @indexName + ' ON ' + @tableName + ' REBUILD; ')
print 'Finished reorganizing ' + @indexName + 'on table ' + @tableName
END
ELSE
BEGIN
EXEC( 'ALTER INDEX ' + @indexName + ' ON ' + @tableName + ' REORGANIZE;')
print 'Finished rebuilding ' + @indexName + 'on table ' + @tableName
END
FETCH NEXT FROM FragmentedTableList
INTO @tableName, @indexName, @indexType, @percentFragment
END
CLOSE FragmentedTableList
DEALLOCATE FragmentedTableList
from reshmeeauckloo http://bit.ly/2mHUNQb
|
#ProjectOnline #PowerBI Currency Conversion Project Cost Report Part 2 #PPM #BI #Office365 #PowerQuery
|
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011. I am also a certified Prince2 Practitioner. This article has been cross posted from pwmather.wordpress.com (original article) |
Following on from my first post on currency conversion found below:
This post walks through a different option for working with multiple currencies. This post will create a similar report as seen below:
This report enables the project cost to be calculated based on project currency and rate for the year. In this example I have two projects that should be reporting costs in Euros,the PWA site is set up using Pounds (GBP) as are the resources that are used on those projects. So for those two projects in PWA the projects display a EUR symbol but there is no conversion to calculate the Euro rate from the GBP resource rates used.
In the steps below we walkthrough how to set up this example. Firstly in the Power BI Desktop client add the Projects OData feed:
- Click Get Data > OData Feed and add the Odata URL for your PWA site: <PWASite>/_api/ProjectData/Projects and click OK
- Click Edit to launch the Power BI Query Editor then click Choose Columns and uncheck Select All to deselect all the columns then select at least ProjectId, ProjectName, ProjectCurrency and ProjectType and click OK
- Click the dropdown menu on the ProjectType column and uncheck 7.
- Change the table from Query1 to Projects
The Projects table is now completed.
Now we need to create a currency table, still within the Query Editor see these steps:
- Click Enter Data and create 4 columns, Currency, Master, Date and Rate then enter the data as required and click OK, for the purpose of the blog post here is the data I entered:
- On my PWA instance, GBP is the default currency used for this demo / blog post so this is set to 1.00 then I have a example currencies / rates for Euros. The project data in my PWA instance ranges from 2016 to 2018 so I need rates to cover those years
- Click Add Column > Custom and enter the name “Year” with the formula of Column Date.Year([Date]) and click OK
- Right click on Master column and change the type to True / False
- Change the table name to CurrencyData
The currency table is now completed.
Now we need to get the Task Timephased data, still within the Query Editor opened from creating the currency table table, see these steps:
- New Source > OData Feed and add the OData URL for your PWA site: <PWASite>/_api/ProjectData/TaskTimephasedDataSet and click OK then OK again
- Click Choose Columns and uncheck Select All to deselect all the columns then select at least ProjectId, TaskCost, TaskIsProjectSummary and TimeByDay and click OK
- Change the table from Query2 to TaskData
- Click the dropdown menu on the TaskCost column, if it states “List may be incomplete” click load more and then uncheck 0. In the advanced editor check the filter is ([TaskCost] <> 0)
- Click the dropdown menu on the TaskIsProjectSummary column and uncheck false
- Click Add Column > Custom Column and enter the name “Year” with the formula of Date.Year([TimeByDay]) and click OK
- Click Merge Queries > Merge Queries, in the Merge window select Projects then select ProjectId in the TaskData table and ProjectId in Projects table:
- Click OK
- In the New Column column heading, click the Expand button, select just ProjectCurrency and uncheck the use original column name option:
- Click OK
- Click Merge Queries > Merge Queries, in the Merge window select CurrencyData then hold the Ctrl key down and click Year and then ProjectCurrency in the TaskData table and then Year and then Currency in the CurrencyData table like below:
- Click OK
- In the New Column column heading, click the Expand button, select just Rate and uncheck the use original column name option:
- Click OK
- Click Add Custom > Custom Column and enter the name “TaskCost_Converted” with the formula of [TaskCost] * [Rate] and click OK
- Right Click the column heading for TaskCost_Converted column and click Change Type > Decimal Number:
The TaskData table is now complete. Click Close & Apply > Close & Apply. Check the table relationships are correct, it should just be Projects linked to TaskData using ProjectId.
Now design the report as required. For the purpose of this blog post I created one table with the following fields:
Ensure TaskCost and TaskCost_Converted fields are set to Sum and all other fields on the table are set to Don’t summarize. If you need to work with multiple currencies in reports, try this out and extend it for your specific needs.
SQL script batch execution using sqlcmd in PowerShell
There is often a mismatch between needs of the development team (multiple discreet T-SQL files for separate concerns) and the release team (the requirement for one step automated deployment) . The script bridges the requirement by using sqlcmd.exe to run a batch of SQL scripts.
A text file is used listing all sql files that need to run in a particular order to avoid errors which may occur if there are dependencies between the scripts. Instead of using a text file a number can be prefixed to the scripts based on the order they need to run.
The script expects two parameters –
- Path of folder containing the set of T-SQL files (and the manifest file, see below)
- Connection string
The script can be downloaded from technet gallery.
## Provide the path name of the SQL scripts folder and connnection string
##.\SQLBatchProcessing.ps1 -SQLScriptsFolderPath "C:\Sql Batch Processing\SQLScripts" -ConnectionString "DEV-DB-01"
Param(
[Parameter(Mandatory=$true)][String]$ConnectionString ,
[Parameter(Mandatory=$true)][String]$SQLScriptsFolderPath
)
Set-ExecutionPolicy -ExecutionPolicy:Bypass -Force -Confirm:$false -Scope CurrentUser
Clear-Host
#check whether the SQL Script Path exists
$SQLScriptsPath = Resolve-Path $SQLScriptsFolderPath -ErrorAction Stop
#a manifest file will exisit in the SQL scripts folder detailing the order the scripts need to run.
$SQLScriptsManifestPath = $SQLScriptsFolderPath + "\Manifest.txt"
#Find out whether the manifest file exists in the the SQL Scripts folder
$SQLScriptsManifestPath = Resolve-Path $SQLScriptsManifestPath -ErrorAction Stop
#if manifest file found iterate through each line , validate if corresponding SQL script exists in file before running each of them
Get-Content $SQLScriptsManifestPath | ForEach-Object {
$SQLScriptsPath = $SQLScriptsFolderPath + "\" + $_.ToString()
Resolve-Path $SQLScriptsPath -ErrorAction Stop
}
$SQLScriptsLogPath = $SQLScriptsFolderPath + "\" + "SQLLog.txt"
Add-Content -Path $SQLScriptsLogPath -Value "***************************************************************************************************"
Add-Content -Path $SQLScriptsLogPath -Value "Started processing at [$([DateTime]::Now)]."
Add-Content -Path $SQLScriptsLogPath -Value "***************************************************************************************************"
Add-Content -Path $SQLScriptsLogPath -Value ""
Get-Content $SQLScriptsManifestPath | ForEach-Object {
$SQLScriptsPath = $SQLScriptsFolderPath + "\" + $_.ToString()
$text = "Running script " + $_.ToString();
Add-Content -Path $SQLScriptsLogPath -Value $text
sqlcmd -S "DEV-DB-01" -i $SQLScriptsPath | Out-File -Append -filepath $SQLScriptsLogPath
}
Add-Content -Path $SQLScriptsLogPath -Value "***************************************************************************************************"
Add-Content -Path $SQLScriptsLogPath -Value "End processing at [$([DateTime]::Now)]."
Add-Content -Path $SQLScriptsLogPath -Value "***************************************************************************************************"
Add-Content -Path $SQLScriptsLogPath -Value ""
from reshmeeauckloo http://bit.ly/2mntBWD
|







You must be logged in to post a comment.