GCI is very slow for remote server location
Hi,Looking for a query to list all *.BAK files which are older than XX days. Used GCI with filter and where-object to get the list of files. I'm getting the results but it's taking 30-40 min to get the...
View Articleget-eventlog with multiple -logname values
Hi Guys! I'm quite new to both this forum and powershell, so please don't laugh at me.I've searched the webb for a solution to my question but didn't get any answer of value, so I'll try here...
View ArticleShameless request: convert Groovy script to PowerShell
Hi all,I'm submitting a shameless appeal to anyone who can convert my Groovy script to PowerShell. I need to launch a process from a script that calls java.exe with some arguments. I have the script...
View ArticleHow to export -Share Ntfs and other AD atrribues for Share permission
I am Trying to pull data in below format from PowerShell , can someone help me with a script :Sr. No.Server NameShared Folder NameFolder Current sizeSharing RightsSecurity RightsDepartmentNo....
View ArticleRemove Multiple SMTP address
Hi Guy's,I've found a script and modified it so i can specify which smtp addresses to remove. The trouble im having is this script removes all the smtp addresses rather than one ones i specify in my...
View ArticleHow to use SSL with different port in Send-MailMessage?
Hi,Does Send-MailMessage support SSL with different port? Where can I specify the port number? Send-MailMessage -from my@test.com -to service.cn@test.com -Subject "Test mail" -Credential $cred -UseSsl...
View ArticleNeed to parse IIS logs with powershell?
I'm looking for a way to point powershell to the c:\iis directory to parse through iis logs and only output information to the screen that matches certain criteria. I know is is a very broad question...
View ArticleImport-Pssession is not importing cmdlets when used in a custom module
I have a PowerShell script/function that works great when I use it in my PowerShell profile or manually copy/paste the function in the PowerShell window. I'm trying to make the function accessible to...
View ArticleHow to upload files to sharepoint 2010 (without using the sharepoint...
How can I use PowerShell to upload a file from a Win 7 workstation to http://sharepoint/Shared Documents/stuff?Everything I have found talks about using the PowerShell command-lets like Get-SP on the...
View ArticleNon-repeated randumo numbers in powershell
Is there any way I can generate a set of random numbers? For instance, I need to generate a set of three numbers in an array and their combination cannot be repeated again EX:X, Y, Z = 20, 23, 50The...
View Articlepowershell which will check the value of string in txt file if not present...
Hi All,I require the powershell script which will check a string value in text file and if not present should append that string to that text file otherwise it should not do anything.Any help is much...
View ArticlePowershell which can check a string value in text file and if not present...
Hi All,I am new to powershell and I require the powershell script which will check a string value in text file and if not present should append that string to that text file otherwise it should not do...
View Articlehow to write batch file to run multiple powershell script?
Hi,We have multiple powershell script files to deploy and install one solution.We need to write a batch file which contains all ps files, so on click of .bat file we can install all ps files.Please...
View ArticleGet new windows of a certain type
Hi,I'm trying to do something similar to Autohotkey's IfwinExist, which means I'm trying to run an action whenever a window of a certain type is opened.I don't really know how to go about it. I tried...
View ArticleDownloading files from Linux
Currently we use pscp and plink to execute commands on a linux machine but that problem is I can't seem to figure out how to impliment error handling. When the command execute, the output is not...
View ArticleDate-time string converting to special format
Hi,I have a task scheduler script. The 2 boxes I ask user for date and time. The date format user inputs is in 12-10-2012 format, and time is military so 10:54:30. The task scheduler wants format of...
View ArticleCheck if drive exists, If not map
I want to check for the existance of a drive mapping (called X in this example) and if it does not exist, I want to map it. Here is what I have so far:$driveCheck = Get-PSDrive | Where-Object { $_.Name...
View ArticleAdd-pssnapin failing through pssession
Hi guys, Im very new to powershell so this may be an obvious fix for someone!Basically I have a script which uses the enter-pssession to connect to a remote server.Then attempting to add a snapin...
View ArticleGet-Content question
I am trying to resolve files that a specific number of entries in order to move them elsewhere or to call a function. If I split get-childitem and get-content up, I can accomplish my task. I would like...
View ArticlePowershell Certification
Is there any certification for powershell skills?It will be fun to have one .... specially for people who focus on infrastructure around Microsoft products
View Article