I'm having difficulty finding directions to programmatically deploy a Crystal Reports XI report to the server for general use. Is there a COM object, Web Service, utility, or something else that can be used to script report deployment?
I will need to do this from PowerShell, but can convert from other available solutions.
...
Just starting out with powershell, I would love to have intellisense support for writing powershell scripts. Tab-completion works great so you would think it would exist somewhere, but the only thing I can find when Googling is an article from 2007 - hardly up to date.
Is there an extension somewhere that gives you this ability? How a...
For some time I have been looking at the possibility to integrate PowerShell as a scripting engine in SharePoint but I haven't found the right solution yet.
My main objective is to enable event triggers in e.g. a list to call and execute a PowerShell script (by filename) on the local server. This would give me a lot of flexibility compa...
I would like to find all directories at the top level from the location of the script that are stored in subversion.
In C# it would be something like this
Directory.GetDirectories(".")
.Where(d=>Directories.GetDirectories(d)
.Any(x => x == "_svn" || ".svn"));
I'm having a bit of difficulty finding the equivalent of "Any()" in ...
I'm using powershell to "grep" my source code for a particular string. If the string is in the file, I would like the name of the file, not the line of code that contains the string.
I would also like the name of the file, just once, not listed for as many times as the file exists.
I'm currently using:
gci . -include "*.sql" -recurse...
I am trying to remove a specific user from sharepoint and have hit a wall.
I keep getting the following error
You cannot call a method on a null-valued expression.
Code:
function verifyUsers
{
$verify_sitepath="https://extranet.mydomain.com"
$verify_site=new-object Microsoft.SharePoint.SPSite($verify_sitepath)
$verify_we...
I would like to select any one ".xls" file in a directory. The problem is the dir can return different types.
gci *.xls
will return
object[] if there is more than one file
FileInfo if there is exactly one file
null if there is no files
I can deal with null, but how do I just select the "first" file?
...
I need to generate a script that will help me in getting a list of compressed files/folders (not zip files, but Windows compressed files) on a range of Windows 2003 servers. I have a client pc connected to the target servers and have access on a administrator role basis. My thoughts was to create a Powershell script to handle this proble...
I am writing a function that returns an id, name pair.
I would like to do something like
$a = get-name-id-pair()
$a.Id
$a.Name
like is possible in javascript. Or at least
$a = get-name-id-pair()
$a["id"]
$a["name"]
like is possible in php. Can I do that with powershell?
...
This is more a general question than anything. I know that VBScript and Powershell can do a lot of the same things and each does things the other can't, but I'm wondering if there's any reason to still learn VBScript or if efforts are best directed into learning Powershell.
/matt
...
Some background:
SharePoint+PowerShell is (Usually) a Perfect Match by Zach Rosenfield [MSFT]
SharePoint+PowerShell Leak Workarounds by me
SO: Could you explain STA and MTA?
In short, standard SharePoint guidance is that COM-backed objects like SPSite and SPWeb should not be used by different threads. This stands in conflict with Pow...
When I try to use the Invoke-Sqlcmd cmdlet from SQL Server 2008 to execute a query that contains scripting variables, ex. $(MyVar), I receive the following exception:
Invoke-Sqlcmd : Object reference not set to an instance of an object.
Here's the code I'm trying to run (which is copy/paste from the Books Online example with only t...
I am powershell newbie. I used a sample script and made substitute from get-item to get-content in the first line.
The modified script looks like below:
$file = get-content "c:\temp\test.txt"
if ($file.IsReadOnly -eq $true)
{
$file.IsReadOnly = $false
}
So in essence I am trying to action items contained in test.txt stored as UNC pat...
Evening all,
I'd like to know how to add to the list of .NET assemblies that are loaded at start up in PowerShell.
Thanks in advance,
Dan
...
Hi,
I've been using Powershell-1.0 for command line needs for a while, instead of cmd.exe.
Unfortunately, there are still some caveats when using java.
I need to pass a property to a jar, like that:
java -jar -Duser.language=en any.jar
This line works fine in cmd.exe, but not in Powershell as it searches for another jar:
Unable to ...
I'm configuring a windows machine to continuously run a powerpoint presentation. The ppt file is located on a samba share (windows file sharing) and will be updated periodically. I need a way to make a batch file that will restart the ppt slide show if the file has been changed. The batch script will run on a a regular interval, and w...
I would like to rename all the jpg files in a folder to uniform convention like Picture00000001.jpg where 00000001 is a counter.
It would be a walk in the park in C# but I would think this is the kind of bread and butter stuff that PowerShell was made for.
I'm guessing something like
$files = ls *.jpg
$i=0
foreach($f in $files) { Ren...
I'm trying to extract various information from Microsoft Security Baseline Analyser 2 results and helpfully found this script: http://fatbeards.blogspot.com/2009/01/powershell-mbsa-logs.html, however I also need a tally of CRITICAL updates, not just all updates as the script currently does.
Critical updates are denoted with Severity="4"...
Does anyone have a handy powershell script that gets a set of files from TFS based on a modification date? I'd like to say "give me all the files in this folder (or subfolder) that were modified after X/Y/ZZZZ" and dump those files to a folder other than the folder they would normally go to. I know enough powershell to hack about and get...
Background: Assume I use the following powershell script from my local machine to automatically map some network drives.
$net = $(New-Object -ComObject WScript.Network);
$net.MapNetworkDrive("p:", "\\papabox\files");
$net = $(New-Object -ComObject WScript.Network);
$net.MapNetworkDrive("q:", "\\quebecbox\files");
## problem -- this on...