PowerShell is Microsoft's new scripting language in 2006, and significantly upgraded in 2009. It allows interpreted scripts based on PowerShell cmdlets and .NET primitives.
0
votes
0answers
5 views
PowerShell issue with App-V 5.0 cmdlet 'ConvertFrom-AppVLegacyPackage'
I am having trouble running the cmdlet ConvertFrom-AppVLegacyPackage from the powershell. It reports the following error:
'ConvertFrom-AppVLegacyPackage : You must run this cmdlet using a Windows ...
0
votes
1answer
28 views
Remove AD User account with powershell fails
Am trying to delete a list of accounts that are either no longer needed or people who have left our employ. I was thinking powershell would be the easiest and so far have the following script to ...
0
votes
2answers
43 views
How can I reset settings for Internet Explorer using a script?
I'm looking to reset Internet Explorer back to factory defaults using a batch file.
I'd also like to delete: all Downloads, History, Cookies and Cache, plus anything else in a user's IE profile.
0
votes
0answers
12 views
Set SSTP VPN connection's “Register this connection's addresses in DNS” setting
I have followed the instructions found here to setup a SSTP VPN connection using powershell. I would like for the RAS connection to have the connection created with the "Register this connection's ...
4
votes
2answers
68 views
Is it possible to list all permissions where I don't have access
I'm looking for a way to recursively go through my entire file share ( fairly large 3TB of files ) and list out all files/folders that I don't have access to. Due to a migration and some errors on ...
2
votes
0answers
24 views
Remote disk monitoring with WMI without admin rights
I am setting up a restricted WMI group that should be able to read WMI information from my remote hosts.
I have the group set up as member of the remote DCOM and performance monitor groups. I also ...
1
vote
2answers
43 views
PowerShell filter files by date in name
I have many files with different names per day. How can I filter them by the date in their name?
For example:
app_20130505.log
app_20130506.log
app_20130507.log
app_20130508.log
app_20130509.log
...
1
vote
1answer
23 views
Invalid namespace “rootvirtualization” on Hyper-V 2012
Running the following command on a fresh Hyper-V 2012 server:
get-wmiobject -namespace “rootvirtualization” -Query “select * from Msvm_ConcreteJob”
produces this errorerror:
Get-WmiObject : ...
1
vote
1answer
32 views
Exchange OWA 2010 signature policy
I have an Exchange 2010 environment. For Outlook (desktop version) we have a script setup in Group Policy to push out standardized signatures across the organization. I want to do the same for OWA, ...
-2
votes
0answers
21 views
Creating a Windows VPS solution [closed]
I got the assignment of putting up a VPS solution for my boss. I would have prefered KVM and libvrt. But he is adamant about using Hyper-V unless i can come up with some really good arguments. The ...
2
votes
1answer
66 views
Sever 2008 R2 Powershell Script runs manually, but not as a scheduled task
I have a Powershell script that runs manually using the Powershell ISE; However, when run as a scheduled task using an administrator's credentials the task does not run with the expected results.
The ...
2
votes
2answers
85 views
PowerShell to reset local Administrator account password. 5% failures
I have the responsibility for changing the local administrator account password on my environment of 16,000 servers; I wrote a PowerShell script, but it took too long, so I added multi-threading using ...
-3
votes
0answers
23 views
Server infected with Backdoor:Win32/Caphaw.D virus, need script to clear shortcuts [duplicate]
Ask here Server infected with Backdoor:Win32/Caphaw.D virus
The virsu hiding all of the folders and replace it with shortcut.
These are the setting in shortcuts.
C:\Windows\system32\cmd.exe /C start ...
0
votes
1answer
44 views
How do I set msExchMailboxGUID using powershell or any other method?
I need to set the msExchMailboxGUID for many accounts in bulk. My input for this data comes from the Powershell command Get-MailboxStatistics. In it is an object that has the GUID for the mailbox.
...
1
vote
0answers
75 views
Powershell Script Hard drive Inventory
I've created a script to get hard drive information from our servers. The script use WMI to query the Win32_LogicalDisk class and returns "Size (GB)", "Free Space (GB)" and "Free Space (%)" for each ...
0
votes
0answers
25 views
Why is Last Windows Update date not set in Registry when Updating via COMObject?
When i manually Update a Windows Machine (W2K3) via the yellow icon in the Taskbar, i can get the last Install date via the Registry:
(Get-ItemProperty -Path ...
4
votes
1answer
68 views
How to get Mailbox Folder Permissions with SamAccountName or UPN?
I need to collect and store the folder permissions for each folder in each mailbox of our Exchange system. I'm already aware of the Cmdlet Get-MailboxFolderPermission but it has a serious problem.
...
2
votes
2answers
61 views
How to pipe an object in the powershell correctly to avoid “Expressions are only allowed as the first element of a pipeline” error
Is there any way to do the following without creating the object $obj?
$obj = New-Object System.Security.Principal.NTAccount("Students") ; ...
0
votes
1answer
33 views
Powershell “ExpandProperty” doesn't work when saving to CSV output
How do I expand the
$thisPerms = Get-Mailbox username -ResultSize unlimited
Get-ADPermission $thisPerms.Identity
| Where {$_.ExtendedRights -like "Send-As" -and $_.User.ToString() ...
1
vote
1answer
59 views
Can I install the Exchange Management Shell on a workstation in a different forest?
At work, we have two forests with a two-way transitive trust between them. I need access to the Exchange management shell for an Exchange environment that resides in a different forest than my ...
0
votes
0answers
23 views
Remotely search across all user mailboxes as an Exchange administrator
Using WMI (Exchange 2003) or PowerShell (Exchange 2007+) is it possible to search across all user mailboxes in an Exchange environment?
0
votes
0answers
59 views
How can I filter a Dynamic Distribution Group by Database name?
I need to create a dynamic DL to list the members of an individual database and I'm unable to get the powershell command to filter the results properly.
[PS] C:\>New-DynamicDistributionGroup -Name ...
3
votes
1answer
49 views
Exchange: exporting and deleting items
How would I safely export data from Exchange 2010 mailboxes to PSTs using New-MailboxExportRequest and have the exported items deleted from the source mailbox? The Powershell cmdlet seems to be ...
2
votes
1answer
46 views
Reauthenticate a Remote Connection via PowerShell Script
I have a PowerShell v1 script that connects to a remote server via UNC path. After a reboot, authentication is needed because Windows apparently will not remember so the script cannot connect to the ...
1
vote
1answer
45 views
Resetting the VMware PowerCLI global:DefaultVIServer and global:DefaultVIServers system variables?
Can anyone here please assist me in resetting the global:DefaultVIServer and global:DefaultVIServers system variables into $null ?
because I cannot do anything with my PowerShell anymore even after ...
2
votes
2answers
69 views
How do I “catch” a failed command that doesn't work with try…catch?
I'm running the following script that fails for a mailbox that doesn't exist
Set-MailboxDatabase rdb16 -AllowFileRestore:$true
Mount-Database rdb16
$stats = Get-MailboxStatistics -Database rdb16
...
0
votes
1answer
42 views
Reconnecting to a Mapped Drive after Server Restart from within PowerShell Script
I have a PowerShell v1 script that connects to a remote server via a mapped drive and moves files back and forth the remote server is identified by drive number "M" and also by UNC path ...
0
votes
0answers
46 views
AppFabric 1.1 on Server 2012 Dashboard Powershell - PSCustomObject
I have installed AppFabric onto Windows Server 2012. I checked the prerequisites were installed first and have installed accumulative update 3. I have an instance of SQL Server 2012 installed to SP1 ...
0
votes
1answer
48 views
Restart a service, and its dependents remotely in Windows
Normally after running Windows updates there are a few servers in our infrastructure that our monitoring software (SolarWinds) shows as having problems. Normally this is flagged as being the netman ...
0
votes
1answer
16 views
How to get process not responding on remote server with Powershell
I don't understand, responding is empty on remote serveur.
Get-Process explorer -ComputerName vcass1 | select name,id,responding
Name Id Responding
---- ...
1
vote
1answer
37 views
PowerShell - Combining Sort-Object to list of piped commands
I need to process files in order from oldest create date to newest.
I found the sort-object command which is what I need however I don't have a clue how to add it to my ForEach() statement.
Can ...
2
votes
1answer
59 views
PowerShell PSCredential Argument List - Path
I need to connect to a remote server and do some file copies and moves, etc. The remote server requires authentication.
What do I need to enter in for PSCredential -ArgumentList, argument #1? Is it ...
1
vote
1answer
45 views
Is there a cmd/certutils to copy a certificate from one store to another?
I would like to know if there is a cmd to copy an existing certificate from one store to another. I am trying to copy a certificate from the Users Intermediate Certification Authorities store ...
1
vote
2answers
38 views
PowerShell v1 Move-Item not Moving items
I have a script (pasted below) that's supposed to do the following:
Loops and grabs all files that match a defined pattern
Copies those files into another location
Move the original source file into ...
1
vote
1answer
30 views
PowerShell Copy-Item Method Fails
I am trying to use PowerShell (v.1) to copy over only files that match a pattern. The file naming convention is:
Daily_Reviews[0001-0871].journal
Daily_Reviews[1002-9887].journal
[...]
When I run ...
1
vote
2answers
63 views
Pattern Matching with PowerShell 1
All,
I am new to Windows admin-type stuff but I am familiar with Unix/Linux, etc. I have a simple PowerShell 1 script that should only copy files that match this naming convention:
...
2
votes
2answers
362 views
Using Powershell to bulk change the Home folder path of AD objects - %username"?
I have done a lot of searching on this, and still cannot find the answer.
I have created a script which will bulk move all user objects in one OU to another OU. This works fine. Now I am trying to ...
2
votes
1answer
76 views
Powershell: Understanding Printer DACLs
I'm attempting to read and eventually write the DACLs for printers shared from my print server. Here's what I have so far, based on scripts found around the internet:
$pace = DATA {
...
4
votes
1answer
91 views
How do I run commands on a remote machine with admin privilege using powershell
How do I run commands on a remote machine with admin privilege (example: running as Run as Administrator) using PowerShell.
So far I have tried
start-process powershell.exe -verb runas ...
4
votes
2answers
117 views
Changing physical path on IIS through appcmd isn't activated
We have come across an issue on IIS 7.5 where we have a simple deploy system which consists of the following:
Create a zip-file of new webroot, consisting of three folders:
Api
Site
Manager
This ...
1
vote
0answers
195 views
The value of property “UserPrincipalName” is used by another recipient object
I'm stuck in some sort of strange loop.
I tried to create an office 365 user, and did not have any available licenses. I followed the link to purchase an additional license, then went back and ...
0
votes
0answers
16 views
Alternative for Obsolete -VhdDestinationPath Parameter
I am trying to import a virtual machine with PowerShell and I want to specify which folder the VHD file should be placed in. According to http://technet.microsoft.com/en-us/library/hh848495.aspx the ...
-1
votes
1answer
85 views
Some regex for powershell [closed]
I have below sample file(s).
Symmetrix logical device count=13
CLARiiON logical device count=0
Invista logical device count=0
Generic logical device count=0
...
0
votes
0answers
74 views
PowerShell doesn't like the -AssignDriveLetter option of the New-Partition cmdlet
I'm trying to create a partition on the USB flash drive using the New-Partition cmdlet. But when I use the -AssignDriveLetter option I get "New-Partition : Invalid Parameter" even though this option ...
0
votes
0answers
72 views
Cannot create partition on disk using PowerShell: “New-Partition : Not enough available capacity”
I'm trying to create two partition on the USB flash drive. The first small 350Mb partition is created fine, but the second throws "New-Partition : Not enough available capacity" even though there is a ...
1
vote
0answers
72 views
Cannot initialize disk in PowerShell : Initialize-Disk throws “The disk has already been initialized”
I'm trying to change the flash drive's partition style to GPT using PowerShell, but the cmdlet throws "The disk has already been initialized" (even though I've cleaned the drive):
PS ...
1
vote
2answers
127 views
Export Windows Server configuration to powershell script?
I'm looking for a way to export role/feature configuration to a scriptfile, like powershell.
Lets say you've installed the DHCP-Role. You configure the scopes, reservations and all that stuff you ...
4
votes
2answers
165 views
Why can a Domain Admin run a powershell cmd locally, but connecting over WinRM with the same account, command returns an UnauthorizedAccessException?
I'm trying to administer a Windows 7 machine remotely. I've enabled WinRM and can use Enter-PsSession to connect to the remote machine.
However, I'm noticing a difference between running a particular ...
0
votes
0answers
53 views
Deleted Users still show in Distribution Groups in Lync
I have deleted some Office 365 user accounts without deleting those users from their various Distribution Groups first.
In Outlook these accounts don't show in the Distribution Droups.
But in Lync I ...
0
votes
1answer
38 views
Windows: Remote Display Back in Powershell a la X11?
If I have two Linux boxes, A and B, I can SSH from A to B with X11 forwarding enabled. This allows me to use graphical applications on B and have the display rendered on Machine A.
Is there a way to ...
