Quantcast
Channel: Windows PowerShell Forum
Browsing all 2562 articles
Browse latest View live

Using invoke with get-process and Select-object

All, I am needing some help with running get-process on remote machines. I am wanting to get specific objects such as Name, ID , HandleCount, fileversioninfo and each time I run the command against the...

View Article


Script to Change DNS Servers on Remote Server

I am new to powershell and I am trying to construct a script to change the DNS servers settings on a whole list of machines remotely. I have the list of machines that I want to change in a txt file. I...

View Article


Compare-object between 2 txt files that have security updates

Hello,I have 2 text files that have the following report of the installed patches on 2 different systems.each file for each system:description                                              hotfixid...

View Article

File size

How to get files sizes from folder 

View Article

How would I spit results from this script to csv or txt

How would I spit results from this script to csv or txt I have tried putting an export-csv and it wont work.Param($ScriptFile = $(Read-Host "Enter the script file"),     $ComputerList = $(Read-Host...

View Article


Enter-PSSession: WinRM cannot process the request, Kerberos authentication...

Hi!I've configured PowerShell Remoting on the server using Enable-PSRemoting commandlet.But when I'm trying to connect to the server I'm constantly getting the following error:PS C:\Users\sergeyp>...

View Article

Powershell script to set the Computer Description field in AD to the display...

I would like to create a Powershell script to set the Computer Description field in AD to the display name - office number of the last person to login to a computer. I've taken a couple posted ps...

View Article

Listing assigned virtual desktops

We have a Windows 7 VDI environment running on Hyper-V 2008 R2. Users are all assigned personal virtual desktops either by using the Remote Desktop Services MMC or straight in ADUC. I've been trying to...

View Article


Export Email Header Information via PowerShell

I was hoping someone could help me achieve the following via Powershell. I'm trying to figure out if we can do this via theMicrosoft Online Services Module for Windows PowerShell (Office 365); or if...

View Article


array is showing as one continous string in email body - how to insert...

$CHANGES = Compare-Object ($BEFORE | ConvertTo-CSV) ($AFTER | ConvertTo-CSV) $REPORT = ForEach ($CHANGE in $CHANGES) {$CHANGE.InputObject | where {$CHANGE.SideIndicator -eq "=>"}}$Message =...

View Article

access denied for wsman:\localhost

I've looked around at the other threads and concluded I must be missing something pretty obvious.  This is windows XPFirewall is off.I'm actually on the localhost, not VPN'ing in or anything.I'm the...

View Article

Graceful way to create an alphabet array

Just curious if there is a graceway to create an array$alphabet = @("A","B", etc...) without having to type it all in from A-Z.Thanks,John

View Article

Try Catch continue foreach

HiThis is properly so simple. But I am trying to make a script where I would like to catch an error within an foreach, but when I set the error action it stops the whole script: try { $colItems =...

View Article


Import-Csv to update Set-ADUser but skip fields that are null?

I'm trying to import a CSV file from our HR department to go through and update employee titles, phone numbers, etc. Everything works fine for rows that contain all of the fields, but when there is a...

View Article

get-computer -credential parameter

I am using the add-computer cmdlet to join a remote machine to the domain from another machine on the same LAN that is already on our domain with a command similar to the one below.  I understand that...

View Article


The Future of Operating Systems.

What will be the features that would give base to Operating systems to live in the era, where every where we will be having roboot in our materialistic life?

View Article

Negative file size mnemonic not binding to parameter

I'm writing a script where the sign of certain parameters determines the functionality.  In particular, positive filesize finds all files larger than X, negative filesize fines all files smaller than...

View Article


get-content

How can I tell get-content to only output lines that (as of the moment) are being added to the text file?my code get-content locationOfTheFile.txt -waitseems to load the entire file.I am looking at a...

View Article

Help with cleaning up this script to use nslookup on our various subnets

Hello,I'm hoping the community can assist with helping me cleanup the following script.  The script works great in that it does an nslookup on all IP's we have available to us but currently it reports...

View Article

Outlook Signature Output issue

Cannot get DisplayName, sn, givenName, and streetAddress to be in lowercase as desired in the output of this script. This script creates an Outlook Signature based on AD Attributes.Any help is greatly...

View Article
Browsing all 2562 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>