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 ArticleCreate local admin on remote domain member
As in the topic does anyone know a method to achieve this in PowerShell?yaro
View ArticleCalling 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 ArticleCode 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 ArticlePScredential 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 ArticleAccess 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 ArticleGet 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 ArticleQuery- 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 ArticlePSremoting 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 Articlepass 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 ArticleOpening 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 ArticleAdd 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 ArticleDo 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 ArticleHow to email if AD user condition is met
Get-ADUser -server domain.com java_service -Properties * | select UserPrincipalName,AccountNameHistory UserPrincipalName AccountNameHistory -----------------...
View ArticleAdd-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 ArticlePowerShell - 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 ArticleFiles 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 ArticleRead 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 ArticlePowershell 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 Articleget-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