Quantcast
Channel: The Official Scripting Guys Forum! forum
Browsing all 15028 articles
Browse latest View live

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 Article


Export 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 Article


Script 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 Article

Script 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 Article

Powershell 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 Article


Get-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 Article

UNIX 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 Article

Awk '{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 Article


PowerShell 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 Article


vbscript

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 Article

Get 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 Article

To 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 Article

Using 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 Article


Powershell 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 Article

Follow-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 Article


Get 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 Article

printer 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 Article


script 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 Article

Disable 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 Article

PowerShell 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
Browsing all 15028 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>