Problems writing AT command to internal modem with...
Hey all, I've come seeking some powershell help, specifically with the System.IO.Ports.SerialPort class... (Code is at end of this post) I'm creating a script to go in and run an AT command on a...
View ArticlePrinting to a non-default printer
Hi, I am fairly new to PS and I need help with the current script I am working on. My script checks all .xlsx files in a directory for any content in the A10 cell of each worksheet. If there is content...
View ArticlePrint a range of pages
How do I print a range of pages in word? Say I have a doc and would like to print pages 5 through 10 for example. Thank youSMaximus7
View ArticleScript to log off particular users
Hi All, I am new to Power shell, i need a script to log off particular users in the task manager. Regards, Arvind
View Article-Confirm:$False ---- How can I implement it inside a PS script?
hello, I have a script that Launch the Enterprise Vault Console and clears out the Index Location for Backup Archive Files. Now this script if I run it it requirs a confirmation.. How can I let the...
View ArticleGet server total % mem and cpu usage
Hi all, So im doing a script for our server farm that will monitor them. I got most of it working, now trying to get cpu and memory readings with following code: #Check CPU usage $CPU = Get-counter...
View ArticleExporting AD Users to CSV, editing/updating, then importing back into AD
Hi guys, I am very new to Powershell and need some help. I would like to export all users to a CSV, file ( with only the details name, department, description, title, company,and office ) update the...
View ArticlePolling performance monitor in a loop- all calls to get-counter following an...
I'm no expert in PS but I have found it very useful as glue logic to automate little things here and there. Recently, someone asked me if there was an easy way to poll multiple servers in a load...
View ArticlePowershell startup script on Windows XP
I am trying to get a Powershell startup script to run on windows XP and nothing seem to happen. The Domain is a single Windows 2008 R2 server with one WXP and one Windows 7. The script runs fine...
View ArticleParse Message Property from Archived EventLog
When using powershell to parse eventlogs on Windows 7 systems, I usually use something like the following to get the username of users that have logged on to the system: get-eventlog -instanceID 4624...
View ArticleFor /F command not working on windows 2003 server
I am unable to run below command FOR /F "delims==" %G IN ('SET') DO @Echo %Gon one of my windows 2003 server where its working fine with all other windows 2000 2003 and 2008 servers.whenever i run...
View Articlehow to set the connection and relay on smtp access in powershell
i want to set the connection and relay on smtp access tab in powershell. 1. for connection: Check the radio button “All except the list below”. 2. on “Relay” button in Access tab. Ensure that “Only the...
View Articleerror using Get-TSServers (part of PSTerminalServices module)
I am using the custom module, PSTerminalServices found here (http://archive.msdn.microsoft.com/PSTerminalServices) but when I try to use the cmdlet Get-TSServers, whether I specify a domain name or...
View ArticleFind the mailbox database size and the count of mailboxes on each database in...
Hi All Please let me know how to get this command working. Never works the way I expect. Hats off to all you powershell gurus. [PS] C:\Windows\system32>Get-MailboxDatabase -Status | FT...
View ArticleIIS 6 and IIS7 - Enable Logging (For ALL sites)
I've spent the whole day finding ways to automate the "enable logging" on all IIS sites. I found a lot of good stuff (both on this site and some others), but not quite what I need. I'm new to IIS, so...
View ArticleNew-ADUser : The object name has bad syntax
I've already seen the other thread, but that was a little bit confusing for me. So my script looks like this: #Users and Groups Import-Module ActiveDirectory $csvfile = Join-Path(Split-Path...
View ArticlePowershell SQL DateTime
Hello, Im having issues when using powershell to pull a SQL query off a local databse. The problem I am facing is that when the data is pulled from the database into my dataset it comes without the...
View ArticleHow to perform chkdsk.exe /r and defrag.exe by Powershell ?
Hi, Do anyone inform me how to use powershell to perform chkdsk/r and defrag in schedule ? Since, it warns the disk is locked or in use. and not allow to execute until next boot thanks
View ArticleHow to run a PowerShell script when user logs into Terminal Server
I created a GPO and linked it to the OU containing my test user. The GPO specifies a Powershell scrip to run at logon at this location: user Configuration / Windows Settings / Scripts...
View ArticleArrays and Hashes
Been introducing myself into powershell but I think I'm stuck here and cant figure what's going on. I have some user properties that I prefer to store into an associative array, say first, last, and...
View Article