get-winevent; how to find description of levels
While using get-winevent I noticed that I can provide an int32 for level. I searched through the help to see what the number values represent, but could not find them.Where are the descriptions of what...
View ArticleRename the pdf file inside sub-directories to the name of the sub directory
I am using win 7 platform. Need your help to create a bat file which simplifies my job. My folders and files are arranged in this structure.File1 folder1 ->abcd.pdf folder2...
View ArticlePowerShell: How to use a PS-function launched from an application that can...
I have made a function in a psm1-file. To make it accessible by whoever runs PS, I put it in $PSHOME\Modules\<folder with the name of the PSM1-file> My backup application can run CMD-files before...
View ArticleWindows forms Progress bar and Wait Cursor...
Hi guys,i need some help with refreshing the progressbar while moving thru functions. I´d also like to change the cursor to the wait state while processing. In general i have the functions and...
View ArticlePowertools - Export excel with formatted column width and cell color
I'm using the powertools to export the data from a datatable. Export-OpenXmlSpreadshet to export the data to Excel 2007 format (xlsx). get-process | export-OpenXmlSpreadsheet "c:\Files\text1.xlsx"I...
View ArticleAccessing an Access Form Control from PowerShell
I have been trying to convert an old VBScript to PowerShell. I have successfully converted all but one innocent-looking sub. In the sub, I need to access a textbox on an Access form, but for the life...
View ArticleExecute Delprof2.exe from Group Policy Logon Script
I would like to know if it is possible to remove stale local profiles from remote workstations that are older than 20 days. These workstations are Windows 7, and possibly Windows XP. Once an end user...
View ArticleMost efficient way to search for files on a remote Server
Can someone please help me with the following query.I want to find the most efficient way of querying file names on a remote server where PowerShell is not installed by default on the remote Server...
View Articlefind computers account with powershell v2 cause xp
hello guys ,i want to find all inactives computers for 3 months, i started my script with my powershell book :)But i have message between $(Get-Date)).days ........Missing closing ')' in expression in...
View ArticleChange Windows Boot Options for W2K8 -- WMI? batch?
I'm looking to change 3 values on boot that are Startup and Recovery parameters in Windows using a script or command-line binary.1. Time to display list of operating systems: 2. Time to display...
View ArticleBATCH or VBSCRIPT - Ping Hostname, Capture Ip Address and Ping -a on IP...
Hi All,I am a hack-a-scripter. I can usually read scripts and merge them or play around with them but in this case I haven't been able to find much on the web.I have a required where I was to provide a...
View ArticleHow do I pull an objects extensionattribute and then convert that attribute...
New to Powershell and still figuring out the basics. We are monitoring the Lost and Found OU and need to notify the admins when an object is in there. However, we'd like to know WHO to contact before...
View ArticleWindows Desktop Search on Non-Indexed Locations
I have seen several example scripts of searching the Windows Desktop Search index and returning results.Is it possible for a script to start a search on a non-indexed location including file contents?...
View ArticleWSH - set focus (activation) to script dialog window
Hi guys,very simple script that is used on users' machines when some SW needs to be installed. My problem is how to activate this dialog window because currently this window is just blinking on taskbar...
View ArticleFunctions in Powershell
I wrote simple function in a script to enable logging in my powershell script. But I am getting error while calling function. Below is my script. If I call function immediately after function, it is...
View ArticleCreate script to run printer maintenance program daily windows xp
Is there a way that I can create a script to run a daily printer maintenance program in windows xp? Everyday I need to go into one of my printers preferences and launch the maintenance window to run a...
View ArticlePowershell: Creating PrinterPorts in PS3.0 with CIM-only
Hey guys, hopefully someone can guide me in the right direction..We currently have many Server 2008 Printservers for several customers, and we have a library of powershell scripts for some tasks we do...
View ArticleQuestion on running VBScript as System and Rights to a Network Share
Hi everyone. I'm a little rusty with VB and had a question about a script I'm working on. In my script I need to be able to connect to a network share to gather some data from certain folders. This...
View ArticleNew-TimeSpan within a ForeEach cmdlt
First let me state that I finally discovered PowerShell and find it both intriguing and frustrating. I have used other languages Pascal, VBN and find PS the new preferred choice, but now for the...
View ArticleSearching for calendar items older than a specific date with search-mailbox...
I need to find the total size of all calendar items in a mailbox older than a specified date using PowerShell through the search-mailbox cmdlet's searchquery parameter. My problem is that I cannot...
View Article