Quantcast
Channel: PowerShell General
Browsing all 10624 articles
Browse latest View live

automated email alert each time any user attempts to login to servers using RDP

Hi,I am totally new to Powershell and scripting and would very much appreciate some help.I have a user that needs to be notified each time someone RDP's to two specific application servers.Does anyone...

View Article


Need to pass variables from a local script to a remote script.

What i got is two scripts.Connector.ps1 which is run locally (planning to exe-wrap this)mainscript.ps1 which is located on a DC.Connector is essentially the part of the script that authenticates to the...

View Article


Application installation via Powershell

HelloI am very new to Powershell. i would like create a PS script which will install application ( silent installation ) to remote workstation. The installer file will be in .msi and .exe format ( eg....

View Article

powershell not installing

Hi all,im trying to install wmf 4.0 (powershell 4.0) on my computer.I currently have version 2 running on windows 7 sp1 with .net 4.5.I am getting the error message "the update is not applicable to...

View Article

Filtering a compare-object output

I have a compare that produces both <= and => results called $Differences. I want to filter out those that are => and from the result, which is a path, I want the bit on the end, which should...

View Article


Dot sourcing a function with same variable as outside this function

Hello everybody I've got a little understanding problem with the following script:function do-something {param($path)$path}$Path = "D:\Temp"Write-Host $Path. do-something -path "C:\Temp"Write-Host...

View Article

Execute an elevated script in a non interactive mode

Hello,I'm trying to execute a powershell script to install some Updates for Windows. But when I execute it in a non interactive mode, I have this message : "To perform some operations you must run an...

View Article

Comparison failing?

I have a program that takes in 2 build numbers and compares them and then if one is greater than the other it will update some soft ware. Problem is this:PS> $test = '8.0.9.0' -gt '8.0.13.0'PS>...

View Article


Saving page in file

Good morning,I'm developing a project in Powershell. My code is below. Basically it should log into gmail site and save content to file. But I am not getting save the page of my emails on file. I've...

View Article


Implement Easiest Solution to Restore Windows XP BKF Files In Windows 2007 Os!

Before sometimes, I was encountering Windows BKF file corruption problem because my all XP created (.bkf) file has been damaged and dissolved due to unexpected virus attack. After corrupt BKF file, I...

View Article

File size & Directory audit

I have a server full of millions of files with directory structure that looks a little like...

View Article

What version of PS is supported on WINDOWS SERVER STANDARD?

I have a PS console on a server that is of WINDOWS SERVER STANDARD version. I need to install PS 2 OR 3. Is it supported on this OS? If yes, can someone point me to the installables. I tried...

View Article

Formatting output

When I run this part of my script#Gets the LastLogon from each DC, turns into a readable output, and the replicated lastLogonDate for the user that is currently $Exists in a ForEach...

View Article


Check for existing file

Greetings all,I currently have a script that returns the number of days since the last sucessful Windows backup. We found a couple of servers that don't have Windows backup configured so there is no...

View Article

Exit a ForEach-object loop if a value is found to be Null

I have a script that I'm writing that goes through a CSV from our HR dept.  They provide me with a list of people who have left but not all of them have an AD account so I need to filter it before I...

View Article


Create Single Text File with Variables from CSV File

I am needing to create a single text file that has 1251 occurrences of the following:DECLARE @return_value intEXEC    @returnvalue = [dbo].[sproc_x_y_z]@providerassetid = N'$asset',@providerid =...

View Article

XML - how to get attributes of a property and not just the property text.

I am sure this is simple, but I am struggling to get the attributes of an XML property to be displayed. I can get the property text, but I would like the also get the name or display-name attribute...

View Article


Adding registry value names and value

I'm trying to implement a command I normally run in batch into PS. I'm a beginner when it comes to PS and need some assistance. Basically, during the logon process, among other things, this registry...

View Article

Another CSV sorting question.

Hi,I am new to powershell but need to sort some data from a csv file but what ever I try, the result is an error. I will try to paste a small part of the csv...

View Article

how to remove spaces from text?

Hi,  this command write all servers name into TXT file, the problem that after every name the command add blank spaces, how can I remove them?Get-ADComputer -Filter {OperatingSystem -Like "Windows...

View Article
Browsing all 10624 articles
Browse latest View live