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

WebClient.UploadFile Slow upload speed

hey guys, i am using the below function, to upload files to my ftp server, and its uploading with a speed not exceeding 49KB/sbut when uploading the same file using filezilla ftp client the speed is...

View Article


Create local admin on remote domain member

As in the topic does anyone know a method to achieve this in PowerShell?yaro

View Article


Calling C# Named parameter function from using the powershell

I am trying to achieve the below scenario.  Say i have a c# function class FooTest {void foo(string a="0", string b="1")void foo(string d="0",int c=0) } in C# i can call this function like below...

View Article

Code certificate not suitable for code signing

Following the MSVA QuickStart video for PowerShell, I tried applying one of my existing code certificates to a test script.I located the certificates via:dir Cert:\CurrentUser -Recurse –CodeSigningCert...

View Article

PScredential class is not storing the credentials provided in script

Dear All, I am trying to copy the text file “1.txt”  to remote share location using start-bitstransfer. I want to copy using a service account that has modify permission on remote share. Below is the...

View Article


Access Denied with Get-WmiObject with Non-Admin account.

I have created a Powershell Session. On this session I have assigned the permission "Full Control(All Operations)" to the local group "test". The user "test.com\User1" is a member of the local group...

View Article

Get HostName for Each RemoteAddress IP in New Member

I have a PowerShell script, which has some variablie 1. $GetCon : Get Tcp Connection in Powershell 2. $hn : Get expand Remote-Address in $GetCon. 3. $rrt : is a Number of all results, it's all...

View Article

Query- Powershell Script

Hi,I have a requirement to automate one of the manual step which we do in openstack for windows imaging. The step we do here is we will have the snapshot ID of each image and will update the snap shot...

View Article


PSremoting failing on remote machines

Dear All, I am facing some issues in terms of PSremoting. On the Windows Server R2 with PowerShell version 4.0 I  have run the fallowing command:PS C:\Users\lp73779> winrm quickconfig WinRM service...

View Article


pass run time values in SQL

hii alli need to run a sql statement on a database selected by the user at runtime I am new to powershell please help currently i am using $Database = Read-Host -Prompt 'Input your Database name'...

View Article

Opening a Word document by using Open method of Documents collection

Hello,Could somebody please help me figure out how to properly open a Word document?$word = New-Object -ComObject "Word.application" $sourceFile = "C:\Users\Admin\AppData\Local\Temp\WordCNV\" +...

View Article

Add property name to an object

Hi,I am running a .ps1 script on collective servers. As an intial step,  exported all the server names to .txt and calling each server from it.Q- How do add property name to this server list ? so that...

View Article

Do not sort object when converting into JSON

Hi,I have Powershell V2 installed on my server, so in order to convert an array of powershell object I needed to use the following JSON conversion function found on Internet. This function working...

View Article


How to email if AD user condition is met

Get-ADUser -server domain.com java_service -Properties * | select UserPrincipalName,AccountNameHistory UserPrincipalName                 AccountNameHistory -----------------...

View Article

Add-Azureaccount without promt issue

Hello powershell GURUSSSSS!!, hope you are doing great,I have the below scrip that it suppose to auto connect to an azure subscription through powershell, i will use this to automate some scripts, like...

View Article


PowerShell - Determining if a GPO is linked

Can anybody advise how I can make use of PowerShell to determine if a particular GPO is linked? I have a script that runs through all the GPOs in the domain via the Get-GPOReport cmdlet but I only want...

View Article

Files and Sessions - One report

I need a way on a 2008 box (no get-smb*) to retrive a list of servers and while files they opened.  I have a list of several servers connecting to a server with the same user id.   All are going to at...

View Article


Read file line by line counting and recording location of certain characters

I need a powershell script that will read every .csv or .txt file in a directory and identify the number of each '|' in each line of a file.  If the number of '|' exceeds 1 in a line, I need to record...

View Article

Powershell DSC user configuration does not work correctly for any reason.

I'm trying to create windows user automatically by using powershell dsc. However I got an error which shows as blow: The PowerShell DSC resource MSFT_UserResource threw one or more non-terminating...

View Article

get-ciminstance "Cannot create a file when that file already exists"

Just installed PowerShell 5 on my W7SP1 box. Wanted to use it to examine installed programs. Tried:    get-ciminstance -ClassName Win32_InstalledWin32ProgramThat worked but unsurprisingly gave a long...

View Article
Browsing all 21975 articles
Browse latest View live


Latest Images

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