Extract text from a line using power shell
I'm beginner, exploring options in powershell.
File with the following info:
Line 1: 22-Aug-2014 : Entry 1.Info : Alex : here it says "Hello World" ok?
Line 2: 24-Aug-2014 : Entry 1.Info : Micheal : here it says "Welcome to my world"
Line 3: 24-Aug-2014 : Entry 1.Info : Alex : here it say "Remember? i said Hello world", done.
Search through the file and only extract specific info related to Alex
Alex: Hello World
Alex: Remember? i said Hello world
Any suggestions to achieve this output using powershell?
Hello jrv, Infact i have started writing some scripts (not an expert though ;) )
tried something like this..
Get-Content .\demo.txt | Select-String -Pattern "Alex" | %{$_.Line.split(":")[3,4]}
Alex
here it says "Hello World"
Alex
here it say "Remember? i said Hello world"
however as i mentioned.. trying to get output in this specific format:
Alex: Hello World
Alex: Remember? i said Hello world
cheers!
Similar Messages
-
Remote managment Exchange 2013 SP1 from C# code using Power-Shell.
Hello,
Sorry if I am describing something wrong, but it is first time I am using Microsoft development forum.
I am trying to built library that will manage Exchange remotely using C# code (VS 2012) and Power-Shell ver.4.0. My workstation and the actual Exchange server physically placed in different domains. In order to test functionalities I am using
user that is member of all administrating and management groups in the appropriative domain. Remote Power-Shell is enabled on Exchange.
In order to connect to the Service I am using that part of code :
internal static bool RedirectionUrlValidationCallback(string redirectionUrl)
bool result = false;
var redirectionUri = new Uri(redirectionUrl);
if (redirectionUri.Scheme.Equals("https"))
result = true;
return result;
internal static ExchangeService ConnectToService(ExchangeVersion version,
string userName,
string emailAddress,
string password,
string domainName,
ref Uri autodiscoverUrl)
ExchangeService service;
try
service = new ExchangeService(version);
service.Credentials = new WebCredentials(userName, password, domainName);
if (autodiscoverUrl.IsNull())
var ads = new AutodiscoverService();
// Enable tracing.
ads.TraceEnabled = true;
// Set the credentials.
ads.Credentials = service.Credentials;
// Prevent the AutodiscoverService from looking in the local Active Directory
// for the Exchange Web Services Services SCP.
ads.EnableScpLookup = false;
// Specify a redirection URL validation
//callback that returns true for valid URLs.
ads.RedirectionUrlValidationCallback = RedirectionUrlValidationCallback;
// Get the Exchange Web Services URL for the user’s mailbox.
var response = ads.GetUserSettings(emailAddress, UserSettingName.InternalEwsUrl);
// Extract the Exchange Web Services URL from the response.
autodiscoverUrl = new Uri(response.Settings[UserSettingName.InternalEwsUrl].ToString());
// Update Service Url
service.Url = autodiscoverUrl;
else
service.Url = autodiscoverUrl;
catch (FormatException fe) // The user principal name(email) is in a bad format. UPN format is needed.
LoggingFactory.LogException(fe);
return null;
catch (AutodiscoverLocalException ale)
LoggingFactory.LogException(ale);
return null;
catch (Exception e)
LoggingFactory.LogException(e);
return null;
return service;
Then I am trying to reach existing mailbox of that user, using this part of code :
try
var runSpace = getRunspace();
var pwShell = PowerShell.Create();
pwShell.Runspace = runSpace;
var command = new PSCommand();
command.AddCommand("Get-Mailbox");
command.AddParameter("Identity", userPrincipalName);
command.AddParameter("RecipientTypeDetails", recipientType);
pwShell.Commands = command;
var result = pwShell.Invoke();
if (result.IsNotNull() && result.Any())
// TODO : fill appropriative DTO and return it.
else
// TODO : send back appropriative error.
closeRunSpace(runSpace);
catch (Exception e)
// TODO : log the exception and send back appropriative error.
private Runspace getRunspace()
var runSpaceConfig = RunspaceConfiguration.Create();
var runSpace = RunspaceFactory.CreateRunspace(runSpaceConfig);
PSSnapInException snapEx;
var psInfo = runSpaceConfig.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.E2010", out snapEx);
runSpace.Open();
return runSpace;
private void closeRunSpace(Runspace runSpace)
runSpace.Close();
runSpace.Dispose();
With this part I had problem. I received exception that appropriative Snap-in is not installed on my computer. I had no installation disk of Exchange in order to install Management Tool (as I understand this is the way to add needed part) so I changed run
space activation to that part of code :
private Runspace getRunspace()
var newCredentials = (PSCredential)null;
var connectionInfo = new WSManConnectionInfo(new Uri("http://exchange.domainname.local/powershell?serializationLevel=Full"),
"http://schemas.microsoft.com/powershell/Microsoft.Exchange",
newCredentials);
connectionInfo.AuthenticationMechanism = AuthenticationMechanism.Kerberos;
var runSpace = RunspaceFactory.CreateRunspace(connectionInfo);
runSpace.Open();
return runSpace;
Now I am receiving exception :
"Connecting to remote server exchange.domainname.local failed with the following error message :
[ClientAccessServer=exchange,BackEndServer=exchange.domainname.local,RequestId=....,TimeStamp=...]
Access is denied. For more information, see the about_Remote_Troubleshooting Help topic."
Please help me to understand what I am doing wrong.
Thank you.
Alexander.In Exchange 2010 you should be using Remote Powershell not local powershell and the snap-in. Here is a sample that may help you:
http://blogs.msdn.com/b/dvespa/archive/2009/10/22/how-to-call-exchange-2010-cmdlet-s-using-remote-powershell-in-code.aspx -
Extract text from hebrew pdf using adobe ifilter 6.0 reverse the letters
Hello pdf Users
I'm using adobe Ifilter 6.0 to extract pdf text from Hebrew documents. The text returned from the filter is reversed both in the letters inside a word, and in the word order.
Example (given in English letters)
Who am I
will give
I ma ohW
This is a known issue in bidi (bidirectional, meaing right-to-left) languages lie Hebrew and Arabic, but I think I saw that Ifilter should supports hebrew OK?
Any help?
RoeeTry the Adobe Acrobat Pro forums.
-
How to get the output of a single command from multiple servers using power shell
Hi All,
I have a requirement in my project, wherein I have to find the database list on each server which has autoshrink option is enabled.
Below is the query which I'm using and I want to automate it in such a way that, I can give the input to powershell script with list of all servers and I need output in csv format which should be giving the database names for which autoshrink option is enabled.
select name from sys.databases where
is_auto_shrink_on=1
Thanks in Advance, Kranthiforeach($instance in $instances){
Invoke-SqlCmd $query -ServerInstance $instance
https://msdn.microsoft.com/en-us/library/cc281720.aspx
¯\_(ツ)_/¯ -
How can i extract the text from the PDF files,Power point files,Word files?
hi friends,
i need to extract text from the PDF files,Power Point,Ms word files.Is it possible with java?if yes how can i extract text from those files.please give solution this problem.i would be thankful if u provide solution.
regards,
prakash.Find an API which could read each of those files and start coding.
-
How to extract text from a PDF file using php?
How to extract text from a PDF file using php?
thanks
fabio> Do you know of any other way this can be done?
There are many ways. But this out of scope of this forum. You can try this forum: http://forum.planetpdf.com/ -
Extract Text from pdf using C#
Hi,
We are Solution developer using Acrobat,as we have reuirement of extracting text from pdf using C# we have downloaded adobe sdk and installed. We have found only four exmaples in C# and those are used only for viewing pdf in windows application. Can you please guide us how to extract text from pdf using SDK in C#.
Thanks you for your help.
Regards
kiranmaiOkay so I went ahead and actually added the text extraction functionality to my own C# application, since this was a requested feature by the client anyhow, which originally we were told to bypass if it wasn't "cut and dry", but it wasn't bad so I went ahead and gave the client the text extraction that they wanted. Decided I'd post the source code here for you. This returns the text from the entire document as a string.
private static string GetText(AcroPDDoc pdDoc)
AcroPDPage page;
int pages = pdDoc.GetNumPages();
string pageText = "";
for (int i = 0; i < pages; i++)
page = (AcroPDPage)pdDoc.AcquirePage(i);
object jso, jsNumWords, jsWord;
List<string> words = new List<string>();
try
jso = pdDoc.GetJSObject();
if (jso != null)
object[] args = new object[] { i };
jsNumWords = jso.GetType().InvokeMember("getPageNumWords", BindingFlags.InvokeMethod, null, jso, args, null);
int numWords = Int32.Parse(jsNumWords.ToString());
for (int j = 0; j <= numWords; j++)
object[] argsj = new object[] { i, j, false };
jsWord = jso.GetType().InvokeMember("getPageNthWord", BindingFlags.InvokeMethod, null, jso, argsj, null);
words.Add((string)jsWord);
foreach (string word in words)
pageText += word;
catch
return pageText; -
How can i extract text from Power point files,wod files,pdf files
hi friends,
i need to extract text from the power point files,word files,pdf files for my application.Is it possible to extract the text from the those files .If yes plz give solution to this problem.i would be thankful if u givve solution to this problem.My reply would be the same.
http://forum.java.sun.com/thread.jspa?threadID=676559&tstart=0 -
Hi, is it possible to extract text from a pdf file using the command line to get an output like you would get by using the File menu and then 'Save as text..."?
I also noticed that in the installation folder there is a small executable called AcroTextExtractor which sounds interesting, but I was unable to figure out how to use it.what's wrong with using automator for this? this certainly seems the easiest. I'm not aware of any built in apple script commands that will do this. But You should also ask on the Apple script forum under Mac OS Technologies.
Message was edited by: V.K. -
Applescript or workflow to extract text from PDF and rename PDF with the results
Hi Everyone,
I get supplied hundreds of PDFs which each contain a stock code, but the PDFs themselves are not named consistantly, or they are supplied as multi-page PDFs.
What I need to do is name each PDF with the code which is in the text on the PDF.
It would work like this in an ideal world:
1. Split PDF into single pages
2. Extract text from PDF
3. Rename PDF using the extracted text
I'm struggling with part 3!
I can get a textfile with just the code (using a call to BBEDIT I'm extracting the code)
I did think about using a variable for the name, but the rename functions doesn't let me use variables.Hello
You may also try the following applescript script, which is a wrapper of rubycocoa script. It will ask you choose source pdf files and destination directory. Then it will scan text of each page of pdf files for the predefined pattern and save the page as new pdf file with the name as extracted by the pattern in the destination directory. Those pages which do not contain string matching the pattern are ignored. (Ignored pages, if any, are reported in the result of script.)
Currently the regex pattern is set to:
/HB-.._[0-9]{6}/
which means HB- followed by two characters and _ and 6 digits.
Minimally tested under 10.6.8.
Hope this may help,
H
_main()
on _main()
script o
property aa : choose file with prompt ("Choose pdf files.") of type {"com.adobe.pdf"} ¬
default location (path to desktop) with multiple selections allowed
set my aa's beginning to choose folder with prompt ("Choose destination folder.") ¬
default location (path to desktop)
set args to ""
repeat with a in my aa
set args to args & a's POSIX path's quoted form & space
end repeat
considering numeric strings
if (system info)'s system version < "10.9" then
set ruby to "/usr/bin/ruby"
else
set ruby to "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby"
end if
end considering
do shell script ruby & " <<'EOF' - " & args & "
require 'osx/cocoa'
include OSX
require_framework 'PDFKit'
outdir = ARGV.shift.chomp('/')
ARGV.select {|f| f =~ /\\.pdf$/i }.each do |f|
url = NSURL.fileURLWithPath(f)
doc = PDFDocument.alloc.initWithURL(url)
path = doc.documentURL.path
pcnt = doc.pageCount
(0 .. (pcnt - 1)).each do |i|
page = doc.pageAtIndex(i)
page.string.to_s =~ /HB-.._[0-9]{6}/
name = $&
unless name
puts \"no matching string in page #{i + 1} of #{path}\"
next # ignore this page
end
doc1 = PDFDocument.alloc.initWithData(page.dataRepresentation) # doc for this page
unless doc1.writeToFile(\"#{outdir}/#{name}.pdf\")
puts \"failed to save page #{i + 1} of #{path}\"
end
end
end
EOF"
end script
tell o to run
end _main -
How to extract text from a PDF file?
Hello Suners,
i need to know how to extract text from a pdf file?
does anyone know what is the character encoding in pdf file, when i use an input stream to read the file it gives encrypted characters not the original text in the file.
is there any procedures i should do while reading a pdf file,
File f=new File("D:/File.pdf");
FileReader fr=new FileReader(f);
BufferedReader br=new BufferedReader(fr);
String s=br.readLine();any help will be deeply appreciated.jverd wrote:
First, you set i once, and then loop without ever changing it. So your loop body will execute either 0 times or infinitely many times, writing the same byte every time. Actually, maybe it'll execute once and then throw an ArrayIndexOutOfBoundsException. That's basic java looping, and you're going to need a firm grip on that before you try to do anything as advanced as PDF reading. the case.oops you are absolutely right that was a silly mistake to forget that,
Second, what do the docs for getPageContent say? Do they say that it simply gives you the text on the page as if the thing were a simple text doc? I'd be surprised if that's the case.getPageContent return array of bytes so the question will be:
how to get text from this array? i was thinking of :
private void jButton1_actionPerformed(ActionEvent e) {
PdfReader read;
StringBuffer buff=new StringBuffer();
try {
read = new PdfReader("d:/getjobid2727.pdf");
read.getMetaData();
byte[] data=read.getPageContent(1);
int i=0;
while(i>-1){
buff.append(data);
i++;
String str=buff.toString();
FileOutputStream fos = new FileOutputStream("D:/test.txt");
Writer out = new OutputStreamWriter(fos, "UTF8");
out.write(str);
out.close();
read.close();
} catch (Exception f) {
f.printStackTrace();
"D:/test.txt" hasn't been created!! when i ran the program,
is my steps right? -
How to read/extract text from pdf
Respected All,
I want to read/extract text from pdf. I tried using etymon but not succed.
Could anyone will guide me in this.
Thanks and regards,
Ajay.Thank you very much Abhilshit, PDFBox works for reading pdf.
Regards,
Ajay. -
hi,
i am having a visual studio custom solution having page layouts implemented. In that solution i am having 1 summary links web part and in that i have hard coded few links and this is deployed on ion dev and staging env.
Now, the issue is : yesterday, customer came to me and asking me to change the links from http://abc to
http://xyz/ in this summary links. can anyone pls throw some light,such that i can change this link using a power shell script. i know if i go the VS solution and change the link and redeploy [ update-spsolution
command] will work.
but if the links are changing regularly , chnaging the vs solution and redeploying is not a good practice.
if i elaborate li'l bit, i am adding the screen shot : i need to get the summary link column's value and need to update[ delete xisting one and add new ones ]
is there any way , i can change the links using power shell script?
i tried the belwo power shells cript to get the page in the page layouts :
$web = get-spweb
"http://siteurl"
$pubWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web)
$pagesListName = $pubWeb.PagesListName
$defaultAspxFile = $pubWeb.GetPublishingPage("$pagesListName/mycustomhome.aspx")
$summaryLinkFieldValue = New-Object
Microsoft.SharePoint.Publishing.Fields.SummaryLinkFieldValue
// here am getting the NULL VALUE
can i get the summary links field correctly and delete / modify the same?
help is appreciated!
##$groupLink = New-Object
Microsoft.SharePoint.Publishing.SummaryLink("My group")
#$groupLink.IsGroupHeader = $true $summaryLinkFieldValue.SummaryLinks.Add($groupLink)Hi Shabeaut,
Could you tell us why do you want to add a link web part to the master page for all pages?
I tested that Summary Links web part (and other types of web parts) added in the master page under Quick Launch couldn't be edited when I edit the pages inherited from v4.master page, it looks by design.
Have you tried using the Quick Launch to add the link instead if you want to show links in all pages.
Thanks
Daniel Yang
TechNet Community Support -
Problem to extract text from HTML document
I have to extract some text from HTML file to my database. (about 1000 files)
The HTML files are get from ACM Digital Library. http://portal.acm.org/dl.cfm
The HTML page is about the information of a paper. I only want to get the text of "Title" "Abstract" "Classification" "Keywords"
The Problem is that I can't find any patten to parser the html files"
EX: I need to get the Classification = "Theory of Computation","ANALYSIS OF ALGORITHMS AND PROBLEM COMPLEXITY","Numerical Algorithms and Problem","Mathematics of Computing","NUMERICAL ANALYSIS"......etc .
The section code about "Classification" is below.
Please give any idea to do this, or how to find patten to extract text from this.
<div class="indterms"><a href="#CIT"><img name="top" src=
"img/arrowu.gif" hspace="10" border="0" /></a><span class=
"heading"><a name="IndexTerms">INDEX TERMS</a></span>
<p class="Categories"><span class="heading"><a name=
"GenTerms">Primary Classification:</a></span><br />
� <b>F.</b> <a href=
"results.cfm?query=CCS%3AF%2E%2A&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
target="_self">Theory of Computation</a><br />
� <img src="img/tree.gif" border="0" height="20" width=
"20" /> <b>F.2</b> <a href=
"results.cfm?query=CCS%3A%22F%2E2%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
target="_self">ANALYSIS OF ALGORITHMS AND PROBLEM
COMPLEXITY</a><br />
� � � <img src="img/tree.gif" border="0" height=
"20" width="20" /> <b>F.2.1</b> <a href=
"results.cfm?query=CCS%3A%22F%2E2%2E1%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
target="_self">Numerical Algorithms and Problems</a><br />
</p>
<p class="Categories"><span class="heading"><a name=
"GenTerms">Additional�Classification:</a></span><br />
� <b>G.</b> <a href=
"results.cfm?query=CCS%3AG%2E%2A&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
target="_self">Mathematics of Computing</a><br />
� <img src="img/tree.gif" border="0" height="20" width=
"20" /> <b>G.1</b> <a href=
"results.cfm?query=CCS%3A%22G%2E1%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
target="_self">NUMERICAL ANALYSIS</a><br />
� � � <img src="img/tree.gif" border="0" height=
"20" width="20" /> <b>G.1.6</b> <a href=
"results.cfm?query=CCS%3A%22G%2E1%2E6%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
target="_self">Optimization</a><br />
� � � � � <img src="img/tree.gif" border=
"0" height="20" width="20" /> <b>Subjects:</b> <a href=
"results.cfm?query=CCS%3A%22Linear%20programming%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
target="_self">Linear programming</a><br />
</p>
<br />
<p class="GenTerms"><span class="heading"><a name=
"GenTerms">General Terms:</a></span><br />
<a href=
"results.cfm?query=genterm%3A%22Algorithms%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
target="_self">Algorithms</a>, <a href=
"results.cfm?query=genterm%3A%22Theory%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
target="_self">Theory</a></p>
<br />
<p class="keywords"><span class="heading"><a name=
"Keywords">Keywords:</a></span><br />
<a href=
"results.cfm?query=keyword%3A%22Simplex%20method%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
target="_self">Simplex method</a>, <a href=
"results.cfm?query=keyword%3A%22complexity%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
target="_self">complexity</a>, <a href=
"results.cfm?query=keyword%3A%22perturbation%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
target="_self">perturbation</a>, <a href=
"results.cfm?query=keyword%3A%22smoothed%20analysis%22&coll=ACM&dl=ACM&CFID=22820732&CFTOKEN=38147335"
target="_self">smoothed analysis</a></p>
</div>One approach is to download Htmlparser from sourceforge
http://htmlparser.sourceforge.net/ and write the rules to match title, abstract etc.
Another approach is to write your own parser that extract only title, abstract etc.
1. tokenize the html file. --> convert html into tokens (tag and value)
2. write a simple parser to extract certain information
find out about the pattern of text you want to extract. For instance "<class "abstract">.
then writing a rule for extracting abstract such as
if (tag is abstract ) then extract abstract text
apply the same concept for other tags
Attached is the sample parser that was used to extract title and abstract from acm html files. Please modify to include keyword and other fields.
good luck
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class ACMHTMLParser
private String m_filename;
private URLLexicalAnalyzer lexical;
List urls = new ArrayList();
public ACMHTMLParser(String filename)
super();
m_filename = filename;
* parses only title and abstract
public void parse() throws Exception
lexical = new URLLexicalAnalyzer(m_filename);
String word = lexical.getNextWord();
boolean isabstract = false;
while (null != word)
if (isTag(word))
if (isTitle(word))
System.out.println("TITLE: " + lexical.getNextWord());
else if (isAbstract(word) && !isabstract)
parseAbstract();
isabstract = true;
word = lexical.getNextWord();
lexical.close();
public static void main(String[] args) throws Exception
ACMHTMLParser parser = new ACMHTMLParser("./acm_html.html");
parser.parse();
public static boolean isTag(String word)
return ( word.startsWith("<") && word.endsWith(">"));
public static boolean isTitle(String word)
return ( "<title>".equals(word));
//please modify according to the html source
public static boolean isAbstract(String word)
return ( "<p class=\"abstract\">".equals(word));
private void parseAbstract() throws Exception
while (true)
String abs = lexical.getNextWord();
if (!isTag(abs))
System.out.println(abs);
break;
class URLLexicalAnalyzer
private BufferedReader m_reader;
private boolean isTag;
public URLLexicalAnalyzer(String filename)
try
m_reader = new BufferedReader(new FileReader(filename));
catch (IOException io)
System.out.println("ERROR, file not found " + filename);
System.exit(1);
public URLLexicalAnalyzer(InputStream in)
m_reader = new BufferedReader(new InputStreamReader(in));
public void close()
try {
if (null != m_reader) m_reader.close();
catch (IOException ignored) {}
public String getNextWord() throws IOException
int c = m_reader.read();
if (-1 == c) return null;
if (Character.isWhitespace((char)c))
return getNextWord();
if ('<' == c || isTag)
return scanTag(c);
else
return scanValue(c);
private String scanTag(final int c)
throws IOException
StringBuffer result = new StringBuffer();
if ('<' != c) result.append('<');
result.append((char)c);
int ch = -1;
while (true)
ch = m_reader.read();
if (-1 == ch) throw new IllegalArgumentException("un-terminate tag");
if ('>' == ch)
isTag = false;
break;
result.append((char)ch);
result.append((char)ch);
return result.toString();
private String scanValue(final int c) throws IOException
StringBuffer result = new StringBuffer();
result.append((char)c);
int ch = -1;
while (true)
ch = m_reader.read();
if (-1 == ch) throw new IllegalArgumentException("un-terminate value");
if ('<' == ch)
isTag = true;
break;
result.append((char)ch);
return result.toString();
} -
New-CMGlobalCondition unable to create New script Condition using Power Shell
I am using config Manger 2012 and trying to use power shell cmdlet to create a new Global Condition using PowerShell but its not working for me using this
Do not understand how to use that command any idea.
New-CMGlobalCondition -DataType Boolean -DeviceType Windows -FilePath file.ps1 -Name test -ScriptLanguage PowerShell
Error comes as
New-CMGlobalCondition : No object corresponds to the specified parameters.
At line:1 char:1
+ New-CMGlobalCondition -DataType Boolean -DeviceType Windows -FilePath file.ps1 - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Microsoft.Confi...onditionCommand:NewGlobalConditionCommand) [New-CMGlobalCondition], I
temNotFoundException
+ FullyQualifiedErrorId : ItemNotFound,Microsoft.ConfigurationManagement.Cmdlets.AppModel.Commands.NewGlobalConditionCommandHi,
What's your version of SCCM? I ran this command line on SCCM 2012 R2 CU2.
It seems SCCM 2012 R2 CU2 fixed New-CMGlobalCondition cmdlet issue.
"The New-CMGlobalCondition cmdlet incorrectly requires use of the
-WhereClause parameter."
Description of Windows PowerShell changes in Cumulative Update 2 for System Center 2012 R2 Configuration Manager
Best Regards,
Joyce
Maybe you are looking for
-
Table for Invoice release date
Hello, Can anyone tell me the table name in which I can get the Invoice release date (Invoice was blocked previously and released with MRBR). I want the date at which it is released through MRBR. Thanks, Input
-
I'm experimenting with Compressor right now, but am wondering about a setting. I need to upload my movie to IMDb and their parameters are Quicktime 480x360 at 30fps. Of course 480x360 results in a squeezed image so I'm trying to output my original 16
-
Tried to take photo w/ iphone 4s. Got "storage full" message. Deleted a good bit of content: video, music, some apps. Phone still shows "0 bytes availible". What's the deal?
-
Disk Utility can't locate my HD
I recently upgraded my memory and after inserting it and booting the screen went to the flashing folder and the question mark but it managed to recover using the internet recovery but I was advisised to purchase a new HD for my MacBook Pro. I booted
-
Hello! I am trying to figure out how to either: 1. Create a report page that will use an SQL query to update a table without having to rerun the table/query script (auto update via browser refresh) 2. Create a pie chart that can take two select state