How to empty recycle bin on remote computers
Hi Team,I'm trying empty the recycle bin on remote computers. I'm using the following code, it works fine on local machine but not on remote machine. Could somebody help me out?$Shell = New-Object...
View ArticleEvent Viewer Logs errors from multiple servers
I want to get the event viewer logs from multiple servers .Here is my code,using this code i want to loop to get the event viewer logs from multiple servers.currently i am geting for only one server...
View ArticleHow to Install Powershell 3.0 in Windows Server 2007
Hi,Could you please let me know the steps to install Powershell 3.0 in Windows Server 2007 Ent.Regards,
View ArticleHow to get/set Share permissions with PowerShell
I have a file server with a bunch of Shares and need to get/set Share perms and inventory stuff. I've looked at other threads on this forum but there seems to be more than one way to do it.What I'm...
View ArticleNeed help simplifying get-date
I have a script that returns all users from AD who logged in from the last 30 days, but I need to adjust it to make it for the current calendar month. I've got the following code but I could do with...
View ArticleScript against outlook mail box is selecting old data
Hi there,I am into this project wherein emails pushed into a folder has to be cross checked whether it arrives.So, to meet this end, I used a powershell script to connect to the mail folder and collect...
View ArticlePowershell Command lastlogon has "Null"
Hi All,We had a requirement to find out the users, who are created but never logged on to any machines. Such users we need to disabledI have tried the below command, but it didn't work. Also i tried to...
View ArticleBug Powershell/PSExec - Missing Information outside ISE
I´m affected of this Bug in Powershell/PSExec http://stackoverflow.com/questions/22593651/powershell-psexec-job Executing powershell script and execute for example ping/tracert/iperf via psexec on...
View ArticleBUG - Powershell/PSExec - Missing Information outside ISE
I´m affected of this Bug in Powershell/PSExec http://stackoverflow.com/questions/22593651/powershell-psexec-job Executing powershell script and execute for example ping/tracert/iperf via psexec on...
View Articlecpu utilization command in powershell
Hi All,I want to get the CPU Utilization Percentage from my system. when i am using this command $DateTime =Get-Date-Format G $ProcessorPercentage...
View ArticleStarting / Stoping an FTP site using PowerShell... IIS 7.5 on 2008R2
Hi, so I want to automate / build functions with PowerShell to interact with IIS 7.5! I done some reading and come to the conclusion (if I am not mistaken) that I should be able to administer / script...
View ArticleRead the content of a properties file
I have a properties file(.properties), which has contents in this format:-[1]TYPE=4 [1]ENABLED=TRUE [1]Caption = "Kozos" [1]URL=https://kozos.com/accessI want to display the value of url for kozos and...
View ArticleFind folders with an extension older than 2 weeks
The helpdesk where I'm at likes to take the nuclear option of troubleshooting and as a first step wipe out a user's profile. They've been reprimanded enough times that they're not actually deleting a...
View ArticleCalling a Function Within a For-Each in Powershell
Error:Unexpected token 'in' in expression or statement.At :line:1 char:22+ ForEach-Object ($i in <<<< $fs_size_info) { $i.Name.Name, GetGB($i.Sum) }Code: foreach ($i in $fs_size_info) {...
View ArticleWindows 2008 R2 Print Server DRP
Hi all, I have two servers Windows 2008 R2 with the print server rol on different sites.One of the server is productive and has around 600 printers and the second one should be the DRP server on...
View ArticlePS: Set-ADAccountPassword - Complexity Exception
I've got problems with setting new passwords via Powershell on Server 2012 R2:Set-ADAccountPassword -Identity testuser48 -OldPassword (ConvertTo-SecureString -AsPlainText "HelloPassword123#" -Force)...
View Articlereplace character to spaces in different position
Hello, i have a lot of txt files with this content:ER-MD122-20150 001001/ 0A0126070320120228I01A4 ER-MD129-20151 001001/ 0A0126070320120228I01A4 ER-MD129-20152...
View ArticleDFSN Module Update
I'm running DFS Servers on Server 2012 and would like to take advantage of some of the new cmdlets provided by DFSN 2012 R2 Under Powershell 4.0. I am unable to upgrade to 2012 R2 at this time, apart...
View ArticleCreate IIS AppPool with Powershell?
Using Powershell 4 and IIS 7.5. Would like to do the following:1. Create AppPool XYZ if does not exist2. Create Web App ABC using AppPool XYZ if ABC does not existHow do you check if IIS AppPool / Web...
View ArticleStart Up Paths in Windows Powershell
Hello,I have a novice question. I have three environments(dev,qa,prod) and would like to manage paths so that hard-coding is minimal. The directory structure for the three environments is identical. I...
View Article