Quantcast
Channel: Windows PowerShell forum
Browsing all 21975 articles
Browse latest View live

Get-WMIObject -Authentication Parameter

I am just curious as to what this actually does. I have a bunch of functions that use Get-WMIObject, to get inforamtion on IIS and restart application pools. So for instance I have the following...

View Article


Environment Variable

I'm trying to solve another problem related to login scripts in DC, using a .vbs program but i'm stuch in another problem that is:Code:Set objShell =...

View Article


Virtual router problem

 when i get started virtual router manager v1.0 reply message The service cannot accept control Manager at this time(Exception from HRESULT:0x80070425). what can i do? please help.......for solution.

View Article

Getting Windows update info dfrom Remote Server

Morning,   I have a script that gets windows update when run  locally. What i want to achieve is to run  this script remotely  on a number of servers and check for updates server1, server2 , server...

View Article

PowerShell function return value

Function MyFunction { Param([string] $ComputerName)  $x1=get-process | Select ProcessName,Handles | FL      return $x1   }write-output $x1.ProcessNameIt doesn't return anything why?

View Article


PrintUI and WMI (Win32_Printer) Having Issues

I'm using the following command (as System) to remotely install a printer for all users on the computer: printui /ga /q /n"\\SERVER\PRINTER" I then issued the following command (via Powershell as...

View Article

Windows XP Document & Settings

Hi All,I am a PowerShell newbie, and am trying to create a PowerShell script that can check if a folder exists for domain users.For example; C:\Documents and Settings\%username%\Local...

View Article

Protocol or API used by Office 365 and Exchange online powershell cmdlets?

Hello All - I was going through some MSDN blog (cannot find the link now :( ) which explained what exactly happens behind the scenes when we execute Office 365 or Exchange online cmdlets. I read that,...

View Article


Update-TypeData: how to make NoteProperty read/write?

$obj=New-Object -TypeName datetime $obj|Update-TypeData -MemberType NoteProperty -MemberName Probability -Value 100 $obj.Probability=0 # Error! How to make it read/write?

View Article


PowerShell changing portions of a string

Hi,Using Powershell,  how would I change two pieces of text with a string at the same time.For example,  lets say the string is a date 01/20/2010.    I want to change the month and year and leave the...

View Article

Powershell to CSV

I've got an old 2003 DC and need to find old accounts.  I'm using the Quest AD module.  My question is this: how can I output to a properly formatted CSV file?  By properly formatted, I mean something...

View Article

How to call function within a script

Function set-maxthreadpolicy {   [CmdletBinding(SupportsShouldProcess=$true,ConfirmImpact="Medium")]           Param([string]$policy,              [int]$count ) $rootDSE = [ADSI]"LDAP://rootDSE"...

View Article

New-JobTrigger on event subscription

How can I create a new scheduled job trigger that triggers when an event occurs, like on workstation unlock? I know how to create a scheduled task on workstation unlock through the GUI, but how can I...

View Article


Image may be NSFW.
Clik here to view.

RDP-TCP Properties changes via powershell

How can I change settings in terminal services from a powershell script for over 200 servers that are not in a domain?  See screenshot of what I need to change.  By default SSL is not selected and you...

View Article

Comparing CSV

We've recently migrated to SharePoint 2013 and I would like to compare the item count from all lists.Our SharePoint 2010 environment consists of 1 site collection. The webs that I want to collect list...

View Article


Get-ADUser cmdlet to retrieve homedrive & homedirectory doesn't return the...

Hello All,I'm trying out a simple command to display the homedirectory & homedrive attribute in a powershell window.The snapin shows the values filled in for the user: http://sdrv.ms/1f92TF9but the...

View Article

"Get-AzureVM" Powershell Command not recognized in application after...

Hi,I am trying to call Get-AzureVM command from MVC application which is deployed to IIS.When I tried same on Console application, it is giving me list of VMs but as soon as I deployed that code to IIS...

View Article


Getting correct date format when using "Win32Reg_AddRemovePrograms64"

Hello fellow PowerShell users,I have the SCCM client installed on servers and as a result I'm looking to see what 64bit software is installed on each of them. So for that I using the following...

View Article

Want to save the output of the powershell script in txt file as well as want...

Hi,I'm trying to save the output of a powershell script to a txt file. I'm able to achieve it. But I want something more then that, I want to save the output in a file as well as want to see the output...

View Article

Two files, two list. i need add distinct item in a list, into the other list.

First,thank you all.I have aprogrammingnewbiequestionthat I hopefor help me.I have twofiles,A andB. Infile AI havea list of namesIn the fileBdoes nothave a list ofnamesrepeated.Infile Arepeated...

View Article
Browsing all 21975 articles
Browse latest View live


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