Power shell command not working in Power shell ISE
I was looking for guidance on a problem I was having and found a post fromBigteddy on TechNet that had this commandGet-ADUser -Identity sam -Properties memberof | select -ExpandProperty memberofI kept...
View ArticleExport CSV object to .CSV file, Powershell
This seemed straightforward but I'm getting errors at the end of everything I try. In the attached script I import a CSV file and change the formatting of a certain column's values so that another...
View ArticleScript that uses EWS to create a top-level folder and then create sub-folders...
Exchange 2010 SP2, Windows 2008 R2. I have been playing with EWS in hopes that I can meet the goals my client would like to achieve. For newly created mailboxes, I need to create a root-level folder...
View ArticleScript errors out in middle of word
Hello all,I have a pretty basic script that I am trying to get to run so we can change a rather important directory and have the shortcut be copied to and/or overwritten on their desktop. Here is the...
View ArticlePowershell Script to print XPS from a folder
Hello Guys,Im a newbie on scripting and im trying to print to XPS from a folder but somehow i cant..Anyone can help?"Dirc:\Test\*.pdf|Foreach-Object{Start-Process-FilePath$_.FullName–VerbPrint}"
View ArticleGet-WinEvent to get "Computer" field for forwarded events
I am using Get-WinEvent to filter forwarded event logs and found it does not include the "Computer" field from the source server.When I view the forwarded events in event viewer there is a "Computer"...
View ArticleUNIX pasting in powershell
I use the paste command in UNIX to join two or more files.Example. file1 contains the line x1file2 contains the line x2I would do this at the UNIX prompt: paste file1 file2.The result would be x1 x2.I...
View ArticleAwk '{print $3, $6, $2}' filename in powershell
I am a novice to Powershell.I cant seem to find a way to use this command 'Awk '{print $3, $6, $2}' filename' in Powershell.Thank you very much for any help.
View ArticlePowerShell add Printer Permissions where the printer name starts with...
I have a printer server that has printers for multiple buildings. All the buildings have abbreviations like "BLD" for example, so my printers start with the same building abbreviations like...
View Articlevbscript
Wondering if someone would be kind enough to helpIs it possible to create a script which list all files in a folder which begin with a particular name, thereafter output the file names to a text file...
View ArticleGet a list of inactive users in SharePoint Online
Hi,Looking for a list of inactive users in SharePoint Online. How can we get that?Appreciate your help.ThanksDeepthi
View ArticleTo Count no of lines in all the files in a particular windows folder using...
Hi Guys,I am new to batch scripting.I have to count the no of lines for all the files that is present in particular windows folder and save the result in a file.And it should delete the result.txt...
View ArticleUsing measure-object to determine size of a folder (Property "length" cannot...
I am have trouble getting the file size of a particular folder.I am trying to do the following:ls "\\someserver\c$\myfolder" | Measure-Object -Property length -sum Measure-Object : Property "length"...
View ArticlePowershell Scriptblock with Elevated Credentials
We have an application that only allows one instance per station, regardless of the user.With Windows 7 pro and fast user switching we are running into issue where the second user is unable to access...
View ArticleFollow-up about CACLS and network users
Hello,Andy Qi was kind enough to offer me some information about editing permissions through CACLS.An example script:cacls c:\ExampleFolder /t /e /g Administrators:fWill change the permissions in...
View ArticleGet the latest entry of an event id by get-eventlog
Hi,I want to extract the last log entry from event logfor example, i like to have the last (newest) event id 4672 in event log (using powershell not wevtutilso i should use get-eventlogbut the problem...
View Articleprinter shares powershell output
When running the basic get-printersecurity in PoSH v3, I get the following output for a given AD group.My question is, in the GUI, that specific group's Security is set as Print (Basic) and Print and...
View Articlescript create shares on W2012
Hi,I have a 2012 server and I want to create shares (c:\Shares\groupn) for groups of users.each group is own by one or many users andeach user can read and write on one or many foldersI manualy do it...
View ArticleDisable all disconnected ethernet ports
I'm trying to script the configuration of my ethernet ports on my server. I want to disable all ports that do not have a cable plugged into it. I have this command -Get-NetAdapter -Name * | ? status...
View ArticlePowerShell 3.0 - Description Field for Computer
Wondering if this can be done and if not, what are my options?Scenario: Newly built Windows 7 PCGoal1: Add PC to Domain and put in specific OU based on win32_computersystem.pcsystemtypeGoal2: Have a...
View Article