Invoke-Command to install .MSI package
I need help with modifying some code that installs .EXE files on remote computers, to work with .MSI packages.$process = 'java.exe' $argList='/s' $sb=[ScriptBlock]::Create("Start-Process...
View ArticleUse Powershell to replace text with image in Word document
I have a powershell script that uses a Word document as a template to create signatures that I am pushing out to my organization.The document is populated with text formatted the way I want the...
View ArticleScript to run on new computer
I am trying to find/create a Powershell script to allow me to transfer files from the users current system such as documents, pictures, nk2 file, outlook signatures, desktop, ect to a new computer. The...
View ArticleMSSOAP Error....every....4....seconds.....
Operating a terminal server on Windows Server 2008 R2. On one of my 4 (I thought) identical servers I'm getting a recuurant MSSOP error every 4 seconds. The error is:Log Name: Application Source:...
View ArticlePowershell: Exception calling "Start" with "0" argument(s): Script1 invoking...
I have one script that is invoking another script. In order to get the output from the second script, I was told to use ProcessStartInfo and Process.#script1.ps1 $abc = $args $startInfo = $NULL...
View ArticleRecycle an app pool in IIS 7 as a non-administrator using powershell remoting?
I have several app pools in my IIS setup that need a swift kick (recycle) once in awhile. I can run the following from a powershell command line myself just fine and even script it for easy...
View ArticlePowershell 4 Desired State Configuration Binary References
Hi,I can't seem to find a dedicated PS4 Desired State Configuration category so posting here:I'm wondering why some of the example PS Desired State Configuration resources use large classes embedded...
View ArticleHow to retreive the IP Address of a terminal server connected user?
Hey everyone, I have been tasked with configuring a script for users logging into a terminal server from thin clients and identifying their location and mapping specific printers specific to their...
View ArticleMacros missing when opening Excel file with PowerShell
The purpose of the PowerShell script I am trying to write is - Open an excel document and run a macro. (The macro is stored in the Personal Workbook file -personal.xlsb and it runs successfully)The...
View ArticleVBScript Error codes when trying to access the extended file properties ?
Hi,I have a script that retrieves the file properties like product name,product version,Copyright etc.. information from a list of files under a folder.I have used the Err object to get the errors if...
View ArticleNeed help with this script.
Here is the complete code [CmdletBinding()] param( [parameter(Mandatory=$True,HelpMessage="The zone name that needs to be updated with the new Master IP's")] [string]$Zonename,...
View Articleis there a way to hide a NIC connection? or hide its IPv6 address?
I need to hide it from Ipconfig and all other things that report IP addresses
View ArticlePowershell 3.0: unattended install of .net 4, reboot then install Powershell...
Hi,As title mentions, I'd like to install Powershell 3.0 (= WMF 3.0) unattended. However, the prereq .net 4 should also be checked if existing if not install it, reboot then install WMF 3.0Any chance...
View ArticleSchedule task to restart server, email when server is up
I am trying to come up with a script to restart a server and then send an email when the server is up.I am stuck right now on what to do as I've tried a few things and no luck.I started with just this...
View ArticleSchedule script to restart service and send email
Alert me|Edit|Delete|Change type 0 I am trying to get this script to work on a windows 2008 R2 server to stop a service for example "spooler", then start the service. I want to get an email only if the...
View ArticlePull multiple monitor resolutions with VB Script
Hey guys,I've just started getting into the more (what I consider) complex elements of IT, and I am currently trying to configure BGinfo to work for some computers we use at work.I am trying to get...
View ArticleRetrieve the path of an AD object
Hey, Scripting Guy! I have been trying, in vain, to return the parent-path of AD objects in distinguishedName format within PowerShell. I have created a function to do this, but it fails when AD...
View Articleusing if statement
HiIs there a different way of writing the following code instead of using if statement?Add $podidFunction Add ($x) { if ($x -match "07") { do this } elseif ($x -match "08") { write-host "a"} elseif ($x...
View ArticleCopying files based on last write time: help a PowerShell newbie
Hi everybody,I'm a new PowerShell scripter, trying to get some experience by writing a few scripts that aren't too hard, and might be useful in the process. What I'm trying to do is get the script to...
View ArticleAdding Multiple Users to Multiple Groups
Hi Scripting guy,I would like some help writing a script that looks at an excel spreadsheet with a list of users and computers and adds them to upto 30 groups withing AD.the format of the excel is...
View Article