Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Browsing all 6937 articles
Browse latest View live

Creating a shortcut as a PIF

Hello,I am trying to create a shortcut however I need the shortcut to be created as a .PIF.Currently I am using the following which will create a shortcut however I cannot get it to work as a .pif as...

View Article


Variables not loading to array - causes duplication in output

This is a continuation from another thread.  Below is the code I'm currently using.I've run this, step-by-step, through the debugger in PowerGUI and Powershell Plus.  It was easier to see in Powershell...

View Article


Powershell Script for RDP sessions.

So I have a very specific need for a powershell script using Microsofts "quser" command to list the current RDP sessions of 5 different servers.  I need it to evaluate all 5 servers, then give me a...

View Article

Merging columns from a large CSV file

Hello all,I am trying to find a way to merge the data from several columns from a CSV file and output the result to another CSV file.The data I am working with is stored into a variable and looks like...

View Article

export-csv

I want to check diskspace on our network, and have a problem when i export it to a csv file i only have the last entry from my import file.is there a way to append the csv file with the next entry?my...

View Article


check for service installed & get status, output report, almost there I think?

Howdy,I have been trying to get a script working to check for a single service and I'm getting stuck.  I have the script below which does get all services and I'm not far off, but I'm not sure how to...

View Article

Restart server & then email

I am trying to write a script to restart a server and then email when the restart is done.I started with this basic command:  Restart-Computer -ComputerName <string[ ]>,But I can't get it into a...

View Article

Windows Server 2012 : Using PowerShell to Deploy Active Directory

The administrative tasks performed in the ADAC can also be handled in PowerShell. To deploy AD via PowerShell, type the following in the PowerShell console (Figure 1):Install-windowsfeature -name...

View Article


Quick Tip: PowerShell function to output external RDP ports

Often when I am connection to a new environment I need to manually setup all of the RDP settings including which external port is used to connect to RDP.Read More

View Article


Linux, Powershell and running remote commands.

I use the following script to gather data from all of our linux servers in the enterprise. Another app normalizes all of the harvested files into a single multi tabbed Excel spreadsheet.  Import-Module...

View Article

Passing a parameter using GET-ADUSER and failing with ParameterBindingException

Hi PowerShell FolksI'm new to PowerShell and need help trying to get the following to work:I'm currently running the following query to return me a list of user alias within a OU.Get-Aduser -Filter...

View Article

help with running batch file on remote computer

Hello guys,i have the local computer called comp1 and the remote computer name comp2i have a batch file on the local computer and i want to run it on the remote computer, I did in both of the...

View Article

Add list of users from file by UPN and add to Global Group

$ADS_PROPERTY_APPEND = 3 $userOU = [ADSI] "LDAP://cn=myUser,ou=Users,dc=contoso,dc=com" $groupOU = [ADSI] "LDAP://cn=myGroup,ou=Users,dc=contoso,dc=com"$groupOU.putEx($ADS_PROPERTY_APPEND, "member",...

View Article


Image may be NSFW.
Clik here to view.

get-GPRegistryValue retrieval of screen saver parameters

This is driving me up the wall, and I think that I'm missing something blindingly obvious.I need to pull a report on the screen saver config - timeout, security, etc. and no matter how I try this, it...

View Article

ArgumentList parameter in Invoke-Command don't send all array

First short code, then question$session = New-PSSession -ComputerName someServer $servicesList = "Service1", "Service2", "Service3" Invoke-Command -ScriptBlock { Param ($newServicesList) Write-Host...

View Article


Net Send replacement

I would like to send a network broadcast to a specific IP address without using Net Send. Anyone have a tool or script to do this?

View Article

Error warmup script for sharepoint 2007 / windows server 2003

I have a script and the spesification of the script is to warm up the iis pool for applications.So the first user that uses the server will not have to wait all day.This is a sharepoint 2007 (yes,  we...

View Article


How To Ping the Serves From List and Parse the Output to Store Selected...

Hi there!Would you be so kind to compose a PowerShell script which does the following? I am trying to do it by myself, but having really hard time with it :(1.There is a file which contains a list of...

View Article

Silent Un-install & re-install of software

I have a software called On-Screen Takeoff 3 that I need to upgrade. I needed help in trying to write a powershell script to uninstall the software which is .exe (not .msi) first and then install the...

View Article

Selecting a particular column modify & add in the text file as new column...

I have a  text  file like this want a particular column to be picked & modified & added to the file as another column (ANY SUGEESTIONS PLS POST ) Input :groupame servername  A a_travp_net...

View Article
Browsing all 6937 articles
Browse latest View live