2020欧洲杯时间表

Questions tagged [powershell]

PowerShell is a cross-platform command line and scripting utility from Microsoft. Use this tag for questions about writing and executing PowerShell scripts ONLY. Programming questions specific to the cross-platform version PowerShell Core (Windows, macOS, and Linux) should be tagged [powershell-core]. Questions about system administration should be asked on Super User or Server Fault.

Filter by
Sorted by
Tagged with
0
votes
0answers
5 views

Powershell - Importing XLSX to Active Directory

Hello and thanks for having me on my first post. I am having difficulty writing what seems to be a simple script but proving a lot harder. HR simply updates an XLSX sheet (She prefers it to be in ...
0
votes
0answers
4 views

how to get huge AD group membership list in CSV

How would i extract all membership (user name + logon name) part of AD group in csv format ? the group contain more than 15K users. I'm getting this error: get-adgroupmember : The size limit for ...
0
votes
0answers
8 views

PE231 wrong json format

I´m using powershell to create a json response with a value, but prtg is saying that the json format is incorrect. To be honest I can´t see the error. param( # Global variables [string]$url_token ...
2
votes
1answer
9 views

Strange properties of the “speak” class

I have a code that involves the System.speech assembly in a for loop but the errors thrown at me are exceedingly strange from what I've seen. I have a code that generates 10 random letters and/or ...
-2
votes
0answers
11 views

Convert File to .txt with powershell

I am trying to convert a file with no extension to a .txt extension with powershell so it can be picked up by some of our automated processes. I am not having any luck with basic powershell outputs
0
votes
0answers
6 views

Remove-AzResourceGroup - Long running operation failed with status 'Conflict'

We have a fairly common occurrence of the Remove-AzResourceGroup cmdlet failing with a conflict error. Deleting a resource group with no active locks should really never fail.
0
votes
0answers
6 views

How to store Reg_Binary registry value in a file in windows

According to windows official document: http://docs.microsoft.com/en-us/windows/win32/sysinfo/registry-element-size-limits Long values (more than 2,048 bytes) should be stored in a file, and the ...
0
votes
0answers
11 views

Why does `Get-Help tree` display `Pester` topic

Does anyone know why Get-Help tree displays the help page for Pester instead of, you know, tree? PS C:\> get-help tree TOPIC Pester SYNOPSIS Pester is a BDD based test runner for ...
-1
votes
0answers
11 views

Powershell script work in SSIS package but not in SQL Server Agent

$today = Get-Date -format "yyyyMMddhhmmss" $source = "E:\****\****\folder" $destination = "E:\***\arc\****\*****_"+$today+".zip" If(Test-path $destination) { Remove-item $destination } Compress-...
0
votes
0answers
14 views

How to retrieve default details in silent installation of exe?

I have to perform silent installtion of my .exe to my customer machine. So I have used powershell script Start-Process -Wait -FilePath "agent.exe" -Argument "/S" It is installed silently but the ...
0
votes
0answers
12 views

Decompressing a base 64 encoded GZip with Powershell

I have the following python code which works: import sys import base64 import gzip from io import BytesIO def deserialize(encoded_string): # decode and decompress the base64 string compressed_json ...
0
votes
1answer
23 views

Powershell - Extract only one zip file from many zip files in a folder

I have a folder of many zip files and I would like to extract only one of them. Let's say I only want to unzip test3.zip for example. c:\docs test1.zip test2.zip test3.zip test4.zip Code: ...
1
vote
0answers
14 views

Use Java to build an index of files in Windows 10

I am writing a desktop application in Java to quickly find files. I have used the exec command in Java to run powershell to do this, as Java's os.walk method seems to be much slower. Right now it ...
2
votes
2answers
16 views

How to make a hashtable throw an error if key does not exists?

Using Powershell 5, I'd like to avoid an hashtable to return $null when a key is not present. Instead, I'd like to trow an exception. To be clear : $myht = @{} $myht.Add("a", 1) $myht.Add("b", 2) $...
0
votes
1answer
15 views

PowerShell : How to show a Help message (Syntax) instead of an error when no parameters specified

I wrote a script to retrieve VM metrics from VMware vCenter. A user needs to provide 2 arguments/parameters. One is the vCenter server and the other is one of the following : Single VM name or a ...

15 30 50 per page
1
2 3 4 5
5424