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

How to write a windows event log using powershell?

Good day,I used the command below to write a windows event log:Write-EventLog "Application" "Desktop Window Manager" "1113" "Information" "TEST" -Category ""but, the output...

View Article


Using a Variable for Add-WindowsFeature Argument

I'm trying to pass a list of Windows features to Add-WindowsFeature as a variable, but I'm having difficulty with it.  If I set the variable as an unquoted string, an error complains that there's a...

View Article


Implicit Remoting Questions

I've been reading up about implicit remoting, and have followed through some of the guides for using this. I've still got some things im not sure about though.How do i ensure that i am not prompted for...

View Article

How to upgrade from powershell 2.0 to 3.0 on a 64bit machine

I have a requirement to upgrade Powershell from 2.0 to 3.0 on a 64-bit machine. I have few queries on this one.1. Do i have to completely uninstall 2.0 before i upgrade or the current 3.0 would be...

View Article

encrypt string into file

I have a text file, called keys.txt below and need to save encrypted key into file. How to use ForEach to do it? Thanks.Key, filename1234, file12345, file23456, file3

View Article


Access Denied - get-wmiobject win32_service (Powershell)

Getting this error when doing get-wmiobject win32_service on the local computer, but not on a remote computer. This happens only when running under Windows Task Scheduler and a domain account; works...

View Article

Invoke-command very slow

Hello,I have a PS script with invoke-command.I must use credssp, because I check from remote server an network share, if there is available.This is my command: Invoke-Command -ComputerName...

View Article

what is the new namespace name for IIsApplicationPool?

IIS7, Powershel 2.I need to set IDLE Time-Out$appPool = Get-WmiObject -Class IISApplicationPoolSetting -Namespace "root\microsoftiisv2" | Where-Object {$_.Name -eq...

View Article


remote execution of powershell on azure IAaS VM using C# Code

hi I have to run some powershell command in remote Azure VM, from my local machine. I can do it in interactive mode, using enter-possession.But I want to achieve this from a C# code. I tried creating...

View Article


Powershell - Active Directory (ADSI)

Hi Guys,I can do an NS lookup of a server. I see the server in the active directory. But still i get a network path error when doing an ADSI request:$group =...

View Article

function parameter optional

Hi, I have a simple function that i call several times from the script. Within function I have 3 parametrs that must requires values (mandatory) and fourth variable $LogFile is optional. Which means,...

View Article

Failover Cluster Server: File Server Role - script creation of shares?

Is it possible to use PowerShell to create a bunch of shares (100+) inside the File Server role which is hosted in a Failover Cluster Server environment (Windows Server 2012).I want to move a huge...

View Article

Script to revoke home folder permission

We are in the process of migrating file server to new hardware and need help with revoking permission to Home folders. We want users to manually copy onlymeaningful data from old home drive to new home...

View Article


Issues with taking ownership and set-acl

I am trying to set the corporate desktop background for a Win 8 build. I understand there are two files called img0.jpg that need to be replaced. I have two issues, first is finding the files and...

View Article

passing multiple array of values as a argument in powershell script

I have to delete files and folders in different locations by using powershell script.Each environment have  different number of archive locations (Dev -2 locations and QA-3 locations etc ) andNeed to...

View Article


Get-ADUser -properties * not working

Hi, sorry if this is very amateur but i'm new to Powershell.I have an issue when running a command against Get-ADUser, i wanted to pull all the properties back for a user so used the following...

View Article

Error installing both PowerShell 3.0 and 4.0! Anyone?

Relevant System Information: Windows 7 SP1 - 64-bit .NET 4.0 and 4.5 both installed System currently at PowerShell 2.0I have tried running it with the System Update Readiness Tool but it didn't change...

View Article


when the work look finished, the problems appear [DELETE EMPTY FOLDERS]

Hi!I've created this script$Remove=@() $Et1="0" $Et2="9" Get-ChildItem "C:\Test" -Recurse | Where-Object {(Get-ChildItem -Path $_.FullName) -eq $null} | foreach($_){ $Sav=Split-Path($_) -leaf...

View Article

New-WebServiceProxy Conversion Error

Hi GuysI am just trying to send a XML to a webservice method and getting the follow error :[xml] $Xml = get-content c:\test\testxml.xml$svc = New-WebServiceProxy -Uri...

View Article

Verify DNS functionality

HiI need to create script to validate that each of the Active Directory Integrated DNS servers are responding successfully to DNS and DNS queries working fine.Please help me or guide me on this.

View Article
Browsing all 21975 articles
Browse latest View live


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