Active Directory PowerShell [closed] - powershell

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
For PowerShell 2.0
I mean to manage Active Directory using Windows PowerShell. I have an application server where in I have installed RSAT with ActiveDirectory PowerShell CmdLets. When I run a command for AD cmdlet, for example; Get-ADOrganizationalUnit it gives me an error message.
'Unable to find a default server with Active Directory Web Services running.'
Upon researching I found 2 articles:
http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=2852 - Install AD Management Gateway Service.
http://blogs.technet.com/b/heyscriptingguy/archive/2011/08/29/use-active-directory-cmdlets-with-powershell-to-find-users.aspx
Question:
Is it really necessary to install AD Management Gateway Service as All the Domain Controllers are running on Windows Server 2003?
Is there any other EASY :) way to query AD like AD CmdLets? I know that Quest is another route but I cant use it as I am prohibited to install any 3rd Party CMDLETS.
Thanks in advance,
Rajiv

Is it really necessary to install AD Management Gateway Service as All the Domain Controllers are running on Windows Server 2003?
Yes.
Is there any other EASY :) way to query AD like AD CmdLets? I know that Quest is another route but I cant use it as I am prohibited to install any 3rd Party CMDLETS.
The Easy way would be the Quest module but if you can't install it I suggest to play with .net class
system.directoryservices.accountmanagement

Perhaps it is possible to use the ADSI interface?
check out the following article:
http://social.technet.microsoft.com/wiki/contents/articles/4231.working-with-active-directory-using-powershell-adsi-adapter.aspx
/Fredrik

Related

AzureDevops Deployment Group won't run on Windows Server 2019 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
Hi I have a new on prem server DELLEMC and I'm trying to run the deployment group registration script but the script won't run and after a while this error will appear "DownloadFile" with "2" argument(s): "
I also refer to this link for help but it didn't work https://github.com/MicrosoftDocs/azure-devops-docs/issues/263
AzureDevops Deployment Group won't run on Windows Server 2019
According to the error message:
Exception calling "DownloadFile" with "2" argument(s): "The operation has timed out."
It seems there is something wrong to download the agent, please try it again. Note, make sure the network is fast and stable. If this issue still exists, please do the following steps:
Download the agent bits from here and select the v2.162.0 or
above . User can download it from other machine and copy that to
this machine if the download is failing because of network issue.
Extract the zip in some folder.
Open PowerShell admin command prompt and go to the folder
Run the below PowerShell script as an administrator:
.\config.cmd --deploymentgroup --deploymentgroupname "{deploymentGroupName}" --agent $env:COMPUTERNAME --runasservice --work '_work' --url 'https://iam-costco.visualstudio.com/' --projectname '{ProjectName}'
You could check this thread for some more details.
Hope this helps.

MongoDB Community : Error when installing service as local or domain user [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
When installing MongoDB Community as a local service you need to enter the future credentials of your account :
If I enter for example:
user: MongoDB
password : root
I got this error message:
The domain, user name and/or password are incorrect.
Remember to use "." for the domain if the account is on the local
machine.
What should I write here? Whenever I write something, I get an error.
Here is the solution:
Username should be 'username' of your system/device.
And password should be password of your system/device.
It's weird, but that shall work.
Here's the solution for Windows 10(x64):
If you don't have a domain (for home or personal computers), leave the domain field with "."
If your computer is owned by your company, contact your system administrator and then in the domain field type : Company_Domain
In the username field,
for personal computers : type your username. If you're signed in with a
Microsoft Account, type the email address or the name of your Microsoft Account.
for company provided machines : type your username as
Company_Domain/Your_Username
In the password field type the password not the PIN number (if you've set it up).
That should help.
I had admin user without password.I had set password and try installation and give local admin user and password.it work for me.
Here is the best solution: Provide your system/device Username and password. And password should be password of your system/device. It's weird, but it shall work.
quit intall . restart install msi file,and select default option
I used the a similar solution as Khan. I went to the download directory and when I executed the msi file this time, I was asked whether the Compass option should be installed. After unchecking that, the rest of the install worked, using default options. This is a Windows 10 laptop.

How to run a Batch script on all connected Computers with Admin rights (Windows 7) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I have a Simple Script to create a user and add it to administrators localgroup in a local computer:
NET USER admin password /ADD
NET LOCALGROUP administrators admin /ADD
I'd like to create a script that copy & execute my file (or execute the commands above) in every available computer in my LAN network. i have admin right to do it manually. but i would very like to automate the process of adding user + give it admin privileges with shell script.
p.s.
If there is another way to do it with CMD / PowerShell it would be great.
I don't have access to the internet so third party programs are not an option.

Can't open site in SharePoint Designer [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm trying to open a sharepoint site in SPD with no success.
SPD is processing, and nothing happens, it keeps processing as if it wouldn't find the site.
Do you have any clue where it comes from ?
For information I'm using the Site administration for this and the SPDSettings of the Web Application are all set to true.
EDIT : After waiting for 10 minutes I had this error :
Service Unavailable
Service Unavailable HTTP Error 503. The service is unavailable.
EDIT 2 : I think this error comes from the fact that i was deploying another solution in the same web application, but in another site collection ...
Your question is unfortunately too general to provide a specific answer. The SharePoint designer communicates to your SharePoint site via a series of web services to pull down the information. There's probably issues going on during these requests. Have you tried logging into the SharePoint Designer as the System Account in order to dismiss any security issues with the site contents?
To diagnose the source of these issues, review the ULS logs that are created during the period of trying to access the designer. These can be reviewed at:
\\<Server Name>\c$\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
Use ULS Log Viewer to provide a real time view of all the log entries SharePoint creates during your usage.

Can I copy files to a Network Place from a script or the command line? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is it possible, in Windows XP, to copy files to a Network Place from the command line, a batch file or, even better, a PowerShell script?
What sent me down this road of research was trying to publish files to a WSS 3.0 document library from a user's machine. I can't map a drive to the library in question because the WSS site is only available to authenticate via NTLM on a port other than 80 or 443. I suppose I could alternately use the WSS web services to push the files out, but I'm really curious about the answer to this question now.
Using a batch file, you can both log on to the resource and copy the file:
The Batch File would contain the following:
net use \\{dest-machine}\{destfolder} {password} /user:{username}
copy {file} \\{dest-machine}\{destfolder}
e.g.
net use \\Development\myfolder mypassword /user:Administrator
copy newfile.c \\development\myfolder
If you are referring to a windows box, just use xcopy. It is pretty standard to have xcopy available.
xcopy src \\dest-machine\shared-library-name\dest
xcopy \\src-machine\shared-library-name\dest src
Powershell uses the abstraction of Providers to provide a common interface into datastores. These seem to stick with the common noun "Item", so you can get a complete list with man *item*. If you know another way to copy and otherwise work with data from a store, you might as well use it, but using the cmdlets provides a better "learn-once, use-often" approach. In your case you could:
Copy-Item test.txt -Destination \\dest-machine\share
Copy-item also supports the -Credential parameter if you need it.
"Network Places" doesn't really have an API, it's just a bunch of shortcuts, and the SharePoint share uses a Shell Extension, if I recall correctly.
All of that to say: accessing Sharepoint as a file system from PowerShell also requires an extension, the SharePoint Provider.
you could use the 'net' commands to authenticate and then copy the files.
copy src \\dest-machine\shared-library-name\dest
I'm not really sure exactly how to handle authentication if it's needed.
From what I'm seeing, it seems that it's not possible to directly access/ manipulate a Network Place from the command line, be it in PowerShell or the plain ol' command prompt.
#slipsec (#13899):
Thanks for the suggestion, but PowerShell doesn't support the port number in the destination path any more than the net use command does.
So the best thing I can figure to do in my particular situation is bite the bullet and buy something like WebDrive to enable drive mapping via WebDAV on non-standard ports, or do some different configuration (e.g. separate web app with a different IP address and host headers) in SharePoint to expose the site via NTLM on a standard port.
I could be wrong about this, but I think that neither Nick's robocopy solution or Nathan's copy command solution will work. Robocopy seems to want a mapped drive, which I can't do because it's not running on port 80 or 443, and Windows can't handle a path that includes the port in a UNC-style name:
copy src \\dest-machine:45000\shared-library-name\dest
I didn't see a NAnt task that would handle this situation, either.
I also know there are tools that will allow me to map WebDAV drives. I was more wondering if there was some way to make use of the Network Places that have been set up without using the GUI.
If it's something you need to script, you should consider NAnt.
It's a mainly used for build scripts, but it's very powerful and reasonably easy to get started with.
There's also NAntContrib and the nant ftp task which should help you out.
Yes you can. I suggest using a tool like robocopy.