menu

Recent questions tagged powershell

1 vote
1 answer
image
Why doesn't file information appear in the Get-ChildItem commandlet? Hi! Here's the question: I installed PS7.0. Everything is fine, but when executing dir (aka Get-ChildItem) via invoke-command the output is a bit confusing (see screens ...
by hekkaaa
asked Sep 23, 2021
1 vote
1 answer
Output a list of running processes and related services in Powershell? I use this script Get-WmiObject Win32_Service | Where-Object ProcessId -In (Get-Process svc).Id | Sort-Object proc | Format-Table proc, stat, name Please help me ...
by lorik340
asked Sep 22, 2021
2 votes
3 answers
How do I print the ip address of the interfaces in powershell and paste it into a file? Hello, can you please help me make a script which will parse ip addresses of windows network interfaces and output them into a configuration file, the first part of the ...
by kotjj
asked Sep 22, 2021
3 votes
1 answer
I got a job and can not use it on cmd and ps can anyone help? The essence of the task, there are 100 files 1file.log; 2file.log; 3file.log; 4file.log... there are 100 more folders 1folder; 2folder; 3folder; 4folder... (all files ...
by keeplod
asked Sep 20, 2021
3 votes
2 answers
GPO. Why is the PowerShell script in Startup not running on a portion of the hosts on the network? Hello, Colleagues. Faced with a problem in the process of automating the updating of 1C platforms on the hosts on the network. There is a functioning PaverShell scrip ...
1 vote
2 answers
Why does Powershell fill one line when exporting to csv? I made a file where I put the output name from AD 10 accounts, in the output I want to get a file that combines the output name and login. When exporting to csv filled ...
by hixr0k
asked Sep 19, 2021
2 votes
2 answers
Retrieving data using powershell from AD? I want to write a small program to get the data from active directory, about the last authorization of the user in the network, under his account. Accordingly, there is ...
by vasiliy763
asked Sep 19, 2021
3 votes
2 answers
PS script doesn't execute 7z commands when run through GPO. If you just run it, it's fine. Why can it be like this? The user under which the script runs is the same. So is the location of the script. What could be the problem and how to fix it? cd C:\echo testtesttest > D:\111111 ...
1 vote
2 answers
Books, articles on powershell? Greetings. I would be grateful if anyone could find useful articles on powershell (I'm sure there are a couple in my bookmarks). As well as adequate books on the effecti ...
by aa3mandius
asked Apr 3, 2021
1 vote
1 answer
How do I run 7zip with keys in powershell? I want to do something like that: $create = "C:\Program Files\7-Zip\7zG.exe" a C:\Users\Admin\full.7z -r C:\Users\Admin\test\ And he writes me Unexpected token "a" in an ...
by 8889996
asked Apr 1, 2021
1 vote
1 answer
How do I correctly assign a variable to the size of the largest file in the directory? Help me figure out how to write the syntax correctly Trying this, but the variable is empty Set-Location C:\Users\$status = get-childitem -Recurse | Sort-Object -Descen ...
by eskotov
asked Apr 1, 2021
2 votes
2 answers
How to make automatic copying from one calendar to another in Exchange 2010? Good afternoon, dear colleagues. I've lost my way - can anyone help me? You need to automatically, using a PoSh script or something else, set up one-way copying of event ...
by Berezoff
asked Mar 29, 2021
2 votes
1 answer
image
How to properly check for string matching? Good afternoon. Very much help is needed for the composition of the condition. The point is this: I have a machine with Acronis, I need to monitor Backup. The idea is a ...
by eskotov
asked Mar 29, 2021
0 votes
1 answer
How do I check if Google Chrome is installed and if not, install it? There is a line from the initial script when installing GCWP $LocalTempDir = $env:TEMP; $ChromeInstaller = "ChromeInstaller.exe"; (new-object System.Net.WebClient).Do ...
by Capey
asked Mar 26, 2021
2 votes
1 answer
How do I add phone numbers for users in Active Directory? There is a list of users and their phone numbers. You need to fill the telephoneNumber attribute for the users in the list. List: displayName; telephoneNumber Petrov Pe ...
by trushko
asked Mar 26, 2021
2 votes
1 answer
How do I install programs by list in chocolatey? I haven't found any clear information. How to create a list of packages to install, just to run it and install all the programs I need? Similarly composer, npm. I unders ...
by greenkey
asked Mar 25, 2021
2 votes
1 answer
How do I use powershell to open a program by pressing a key? Colleagues, hello everyone! When running the powershell script, after waiting 10 seconds the RDP shortcut should start, but if at that moment the user pressed a certain ...
by Sanchez9891
asked Mar 25, 2021
2 votes
1 answer
How do I print the Invoke-SQLcmd result to a gui Powershell form? Good afternoon. There is a script with a query attached to it. I sketched a GUI for the script, and I really want the Invoke-sqlcmd output to fit into that GUI. Out-Grid ...
by soulyaris
asked Mar 25, 2021
1 vote
1 answer
How do I drop a function into Invoke-Command? Hi. The question is this: You need to throw a function in the invoke-command function. Example: function a1 { $aa1 = 'Name1'"Code code code...."return $aa1}function b2 ...
by hekkaaa
asked Mar 24, 2021
1 vote
1 answer
Why doesn't the Job work on a remote call? Good afternoon, gentlemen) it's the second day of fighting, but I can't help it, I have to ask) Sabz 2: I have: WS 2012 R2 with OpenSSH on board powershell script Task: ...