Hi Guys,
I´m just trying to finish a ProwerShell GUI application for Microsoft SharePoint 2010 administration.
However a PSSnapin for SharePoint (Microsoft.SharePoint.PowerShell) is strongly required to rum SharePoint cmdlets.
Since I run SharePoint cmdlets at several stages on my application, I have to add the PSSnapin at the main form of my script.
To improve the usability I´d like to run a ProgressBarOverlay with Marquee style.
But while the PSSNapin is loading, the progressbar freeze.
Any ideas how to make this progressbar running without adding the PSSnapin in a job which adds the PSSnapn only in the job thread?
Thanks in advance for your help!
Running Progressbar while adding a PSSnapin
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- SAPIEN Support Forums
- Posts: 945
- Last visit: Thu Oct 22, 2015 1:10 pm
Running Progressbar while adding a PSSnapin
This is an automated post. A real person will respond soon.
Thank you for posting, Luke_F.
Here are some hints to help you get an accurate and complete answer to your question.
Ask in the best forum:
Anticipate follow-up questions!
Did you remember to include the following?
*** Make sure you do not post any licensing information ***
Thank you for posting, Luke_F.
Here are some hints to help you get an accurate and complete answer to your question.
Ask in the best forum:
- - Scripting question? For questions about Windows PowerShell or other scripting languages, use Scripting Answers.
- Software question? For questions about PowerShell Studio, PrimalScript, or other SAPIEN products, use Product Support Forums for Registered Customers.
- Trial question? For questions about trial versions of any SAPIEN product, use Trial Software Questions.
Anticipate follow-up questions!
Did you remember to include the following?
- 1. Product, version and build
2. 32 or 64 bit product
3. Operating system, e.g. Windows 7 64 bit.
4. Attach a screenshot, if applicable
5. Attach logs, crash reports, etc., in a ZIP file
*** Make sure you do not post any licensing information ***
Re: Running Progressbar while adding a PSSnapin
You cannot use a progress bar during the loading of a snapin. Since the application is single threaded you are frozen until theload is complete.
YOu cancreate a custimm console withteh snapin preloaded. Then use the console to launch you app. That is how Sharepoint does it. The consle still takes timmeot load.
YOu can skip the snap-in and use the Sharepointlibray directly. It does not take time to load.
YOu cancreate a custimm console withteh snapin preloaded. Then use the console to launch you app. That is how Sharepoint does it. The consle still takes timmeot load.
YOu can skip the snap-in and use the Sharepointlibray directly. It does not take time to load.
Re: Running Progressbar while adding a PSSnapin
Thanks a lot for you reply.
Could you please let me know how to skip the snap-in and use the Sharepointlibray directly?
Could you please let me know how to skip the snap-in and use the Sharepointlibray directly?
Re: Running Progressbar while adding a PSSnapin
Not is a few sentences. Search for powershell and sharepoint. YOu should find manuy examples.Luke_F wrote:Thanks a lot for you reply.
Could you please let me know how to skip the snap-in and use the Sharepointlibray directly?
Re: Running Progressbar while adding a PSSnapin
Here is a teaser:
PowerShell Code
Double-click the code block to select all.[System.Reflection.Assembly]::LoadWithPartialName ("Microsoft.SharePoint") $sitecollection = New-Object Microsoft.SharePoint.SPSite ("http://sharepoint/blog") $web = $sitecollection.AllWebs["blog"] $web.Title
- dan.potter
- Posts: 709
- Last visit: Wed Nov 14, 2018 11:39 am
Re: Running Progressbar while adding a PSSnapin
does the default progress bar run when adding a snappin on form load? I know the AD module does.