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

Multiple HTTPS listeners for WinRM

I'm setting up the computers on my home subnet to use HTTPS for WinRM. It's going well so far, but now I want to be able to access the home server from the internet via HTTPS. I want to have a listener...

View Article


Building a "Dynamic" filter for Get-ADUser

Hi I am trying to build a script for creating distribution groups, but I would require me to be able to do different filters.eg. one group could be if country eq UK, or a group where country eq UK, and...

View Article


Scriptblock

Hello,I was going through Jeffrey Snover's old blog about scriptbock http://blogs.msdn.com/b/powershell/archive/2006/06/23/643674.aspxI am trying to run the below command as per his blog but it gives...

View Article

Image may be NSFW.
Clik here to view.

Powershell 4 cmdlets not recognized in win 7 or 2008 with .net framework 4.5...

Hi,I downloaded and installed windows .net framework 4.5 and windows framework 4 on one windows 7 and one Windows 2008 computer from two computers that never had an update.When i launch powershell...

View Article

Create Multiple Users In Active Directory Quickly using powerShell Script -...

Hi,my boss ask me to Create Multiple Users In Active Directory Quickly using powerShell Script, the problem that when i enter a a descrition in hebrew (or somthing eles i Hebrew) for the user i want to...

View Article


Add-PsSnapin takes very long

Hello,I have a script which works fine, only the time to load the SharePoint PS SnapIn is to long.How can I do load the PS SnapIn faster ?Script:Start-Transcript 'c:\temp\log.txt' try{ $start_time =...

View Article

Invoke- WmiMethod - How to pass input object

How to pass inputobject to Invoke-WmiMethod? We tried the below it throws error$request = Get-WmiMethod -Class xx -NameSpace yyy -ComputerName zzzInvoke-WmiMethod -Name xxx -InputObject $request...

View Article

Excel errors in PowerShell script - can I ignore? If yes, how do I suppress...

I pieced together a few different scripts to create a PowerShell script that will prompt a user for three things:an AD group namea folder location to be used as a "root"how many levels deep you'd like...

View Article


How 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 Article


System::Management::Automation not recognized in cpp code

I need to call powershell cmdlets from cpp code. The cmdlets which will operate the vm's from the hyper-v.I found that to run the powershell cmdlets, will have to create powershell object and then...

View Article

Arp / Dos command format output

HiIm looking to run the arp command within powershell and format the output so I only see the mac addressesIve been trying for a while and gotten as far as         arp -A | sort-object "Physical...

View Article

cpu utilization command in powershell

Hi All,I am having multiple servers,i need to get the cpu utilization for each server using power shell.can any one help on this power shell command .how to get the exact cpu utilization.Regards,Phani.

View Article

table output

HiHow do I add the variables into one variables $table?foreach($vhdd in $vhdds){  $hddlabel = $vhdd.extensionData.DeviceInfo.Label  $hddSize = $vhdd.CapacityGB;  $hddFilePath =...

View Article


DSC configuration data for Script resources

Hi,I'm trying to use PowerShell DSC to modify a settings file for an in-house application. I'm able to pass configuration data to File resources, but the same syntax doesn't work for Script resources...

View Article

Image may be NSFW.
Clik here to view.

Error in send-mailmessage command

Hello,I am executing the powershell command  to send mails from internal SMTP Server but when am executing this command getting error as "Unable to connect to the remote server".I have checked no port...

View Article


Run cmd from a remote desktop

I am trying to execute  a cmd on 20 servers by passing kozos as an argument. It works fine locally but remotely it failsThe code i am using is :-$Servers = "localhost", "kozos" Foreach ($Server in...

View Article

No entry in department field and exclude 3 OU's

Hi,I'm trying to get a list of all my users who do not have entry in the department field, but exclude user account in 3 OU's (Ex Employees, MyTest and the Users container). This what I have come up...

View Article


Filtering XML from Powershell

I have the below XML<!-- XML Configuration File to check standard of SQL Server Build --> <serverInstances>  <InstanceConfiguration>SMALL_SERVER...

View Article

How to get ServerName,DataBaseName,DBSize,DBFreeSize using PowerShell.

Hi All,I want to  get the ServerName,DataBaseName,DBSize,DBFreeSize using PowerShell.I will give the ServerName and DataBaseName in WebConfig File Based on the i have to get the Particular DB Used...

View Article

Download.FIle

2 questions about this object:$d = New-Object System.Net.WebClient $d.DownloadFile($url, $localPath)1. Is there a way to use this to download multiple files in same time?2. Is there a way to integrate...

View Article
Browsing all 21975 articles
Browse latest View live


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